eslint/rules/exports
Exports: a source file exports one function or class, named after the file (format-count.ts exports formatCount, button.component.ts exports ButtonComponent); small exported types and constants may sit next to it. Entry points, stories and test code are left out.
1 rules, 1 on. Source: lint/eslint/rules/exports.mjs.
| Rule | Setting | Files | What it checks | Why |
|---|---|---|---|---|
local/export-matches-filename | warn, {"exports":"functions-and-classes"} | src/**/*.ts | Require one exported function or class per file, named after the file. | Custom: one exported function or class per file, named after the file; types and constants may sit next to it. Warn: two exported functions in one file, or a name that differs from the file, is to justify. |