ESLint plugin that enforces consistent filename conventions for JavaScript files.
eslint-plugin-filenames is an ESLint plugin that adds rules to enforce consistent filename conventions for JavaScript and JSX files. It helps teams maintain naming standards by checking filenames against regular expressions or ensuring they match exported values, reducing inconsistencies in codebases.
JavaScript developers and teams using ESLint who want to enforce consistent file naming conventions across their projects, particularly in larger codebases where naming consistency improves maintainability.
It provides specialized linting rules for filenames that ESLint doesn't cover natively, with flexible configuration options like regex patterns, export matching, and naming transforms to fit various project conventions.
Eslint plugin to check filenames.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The match-regex rule allows custom regular expressions for filename patterns, with options to ignore exported files, giving precise control over naming conventions as shown in the configuration examples.
Supports aligning filenames with default exports using transforms like kebab, snake, camel, and pascal cases, and can strip suffixes like .react, ensuring consistency between code and file structure.
Disallows index.js files to improve developer experience by reducing ambiguous file names, which is especially useful in large codebases for better navigation.
Offers advanced options such as handling exported function calls and multiple transforms, making it adaptable to various project requirements as detailed in the rule configurations.
The README explicitly states the project is no longer actively maintained, posing risks for bug fixes, compatibility updates, and long-term reliability in evolving JavaScript ecosystems.
Only lints .js and .jsx files processed by ESLint, ignoring other file types like TypeScript or non-JS assets, which restricts its utility in modern full-stack projects.
Setting up rules with multiple transforms, regex patterns, and flags can be intricate, as evidenced by the detailed examples, leading to potential setup errors and maintenance overhead.