TypeScript · maintainability
no-generic-single-export-module
eslint:no-generic-single-export-module Disallow generic module stems when one runtime export already names the responsibility.
- Default
- error
- Fix
- none
- Languages
- typescript
Why
A generic filename hides the sole exported responsibility and makes navigation less descriptive.
Fix
Rename the module after its single runtime export.
Before / after
Executed by this rule’s unit tests.
Before
Do not hide one export in a generic module
export function parseOrder() { return {}; } After
Name the module after its export
export function parseOrder() { return {}; } Limits
- Only configured generic stems with exactly one public runtime export are reported.
Message IDs
genericSingleExport