Enforces naming conventions for React component files using ESLint. Currently at version 0.0.2, this plugin provides a single rule, react-filenames/filename-matches-component, which verifies that a file's name matches the default export component's name. It is a lightweight, opinionated linter plugin designed for React projects using ESLint 2.x or 3.x. Unlike broader plugins like eslint-plugin-react that cover many rules, this plugin focuses specifically on file naming consistency. The release cadence is low, with no updates since its initial release. It requires ESLint 2.x or 3.x and the react plugin as peer dependencies.
npm install eslint-plugin-react-filenamesVerified import paths — ran on the pinned version, not inferred.
ESLint configuration to enforce that React component filenames match their default export name.
Switch to eslint-plugin-react's 'jsx-filename-rule' or similar alternative.
Ensure components are default-exported, or consider using a different rule.
Use legacy ESLint version or migrate to a supported plugin.
Add 'settings.react' block to your ESLint config.
Ensure rule value is a string severity (e.g., 'error') or array with options. Check ESLint peer dependency compatibility.
Run 'npm install eslint-plugin-react-filenames --save-dev' and ensure you are in the correct directory.
No dependency data recorded yet.