ESLint plugin providing naming convention rules for React components, hooks, and props. Current stable version 4.2.3, part of the @eslint-react monorepo. Requires ESLint ^10.0.0 and Node >=22.0.0. Ships TypeScript types. Differentiated by its decoupled preset from eslint-plugin-react-x, allowing standalone use without the full react-x plugin. Release cadence is high (multiple betas per month) with breaking changes in v5.x series. Supports custom rules like boolean prop naming. ESM-only, no CJS support.
npm install eslint-plugin-react-naming-conventionVerified import paths — ran on the pinned version, not inferred.
Shows how to set up the plugin in flat ESLint config (v9+), enabling component-name and hook-name rules.
Upgrade ESLint to ^10.0.0 and Node to >=22.0.0.
Migrate to v5.x (currently beta) for continued updates. Switch to ESM imports.
Use import syntax and ensure package.json has 'type': 'module' or use .mjs extension.
Use the *Call variants (e.g., RuleToolkit.is.MemoCall) instead.
Install typescript in your project even if not using TS directly.
Remove rule from config; it was removed upstream.
Change to import statement: import reactNamingConvention from 'eslint-plugin-react-naming-convention' and ensure parent module is ESM.
Run npm install eslint-plugin-react-naming-convention --save-dev and verify node_modules path.
Ensure plugin object is assigned under plugins key with correct prefix: plugins: { 'react-naming-convention': reactNamingConvention }Access rules via import { rules } from 'eslint-plugin-react-naming-convention'; rules['component-name']