An ESLint plugin for enforcing filename conventions with straightforward configuration. Current stable version 0.9.0 (last updated 2024). Supports ESLint 7.x and 8.x, Node.js >=14.17.0. Provides six rules: extension, named-export, naming-convention, no-index, pluralize, and typescript-module-declaration. Offers pre-configured recommended presets for plain JavaScript/TypeScript, React, and Vue projects. Inspired by eslint-plugin-filenames but with a simpler configuration model and additional rules like named-export and typescript-module-declaration. Does not support ESLint 9.x or flat config yet.
npm install eslint-plugin-filenames-simpleVerified import paths — ran on the pinned version, not inferred.
Shows how to configure the plugin with recommended preset and custom rules for kebab-case and specific extensions.
Use ESLint 7.x or 8.x until the plugin is updated.
Always explicitly set the 'rule' option to avoid unexpected defaults.
If you need index files, set the rule to 'off' or configure exceptions.
Ensure each file exports only one named symbol, or disable the rule.
Run 'npm install -D eslint-plugin-filenames-simple' and ensure .eslintrc uses 'plugins: ["filenames-simple"]'.
Add a 'rule' property: ["error", { "rule": "kebab-case" }].