Registry / testing / eslint-plugin-react-filenames

eslint-plugin-react-filenames

JSON →
library0.0.2jsnpmunverified

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-filenames
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-REAC
E
eslint-plugin-react-filenames
testingjavascriptv0.0.2
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rules
✓ import { rules } from 'eslint-plugin-react-filenames'
✗ const plugin = require('eslint-plugin-react-filenames')
The main export is a plugin object. Use the plugin directly in ESLint config as 'react-filenames'.

ESLint configuration to enforce that React component filenames match their default export name.

{ "plugins": ["react-filenames"], "rules": { "react-filenames/filename-matches-component": "error" } }
Debug
Known issues
deprecatedPackage is no longer maintained and uses outdated ESLint API (1.x–3.x). May not work with ESLint 4+.
fix
Switch to eslint-plugin-react's 'jsx-filename-rule' or similar alternative.
affects: >=0.0.0
gotchaThe rule 'filename-matches-component' requires a default export, but not all React components use default exports.
fix
Ensure components are default-exported, or consider using a different rule.
affects: 0.0.2
gotchaESLint 2.x/3.x peer dependency: plugin does not support ESLint 4+.
fix
Use legacy ESLint version or migrate to a supported plugin.
affects: >=0.0.0
gotchaThe plugin does not automatically detect component names; it requires the eslint-plugin-react settings for pragma and createClass.
fix
Add 'settings.react' block to your ESLint config.
affects: >=0.0.0
Errors
Common errors & fixes
ESLintError: Configuration for rule "react-filenames/filename-matches-component" is invalid
Rule configuration expects an array but got a string, or ESLint version mismatch.
fix
Ensure rule value is a string severity (e.g., 'error') or array with options. Check ESLint peer dependency compatibility.
Error: Cannot find module 'eslint-plugin-react-filenames'
Plugin not installed in the project's node_modules.
fix
Run 'npm install eslint-plugin-react-filenames --save-dev' and ensure you are in the correct directory.
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
eslint-plugin-react-filenames — npm install eslint-plugin-react-filenames · libregistry