eslint-plugin-react-naming-convention
Naming convention rules.
Install
npm install --save-dev eslint-plugin-react-naming-convention
Setup
import js from "@eslint/js";
import reactNamingConvention from "eslint-plugin-react-naming-convention";
import tseslint from "typescript-eslint";
export default tseslint.config({
files: ["**/*.ts", "**/*.tsx"],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
],
plugins: {
"react-naming-convention": reactNamingConvention,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"react-naming-convention/component-name": "warn",
},
});
Rules
https://eslint-react.xyz/docs/rules/overview#naming-convention-rules
v1.47.3 (2025-04-15)
🐞 Fixes
- fix: fixed potential false negatives in
no-leaked-conditional-rendering
when logical expressions are wrapped by type expressions by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/1068
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v1.47.2...v1.47.3