Skip to content

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.

RuleSettingFilesWhat it checksWhy
local/export-matches-filenamewarn, {"exports":"functions-and-classes"}src/**/*.tsRequire 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.

Generated from the JSDoc of the sources.