Skip to content

no-generic-single-export-module

Disallow generic module stems when one runtime export already names the responsibility.

Why

A generic filename hides the sole exported responsibility and makes navigation less descriptive.

Fix

Choose a responsibility-bearing module name or colocate the export with its domain.

Examples

Before — flagged Do not hide one export in a generic module
src/utils.ts
export function parseOrder() {
return {};
}
After — preferred Name the module after its export
src/parse-order.ts
export function parseOrder() {
return {};
}