eslint-plugin-react-naming-convention
TypeScript icon, indicating that this package has built-in type declarations

1.48.4 • Public • Published

eslint-plugin-react-naming-convention

Naming convention rules.

Install

# npm
npm install --save-dev eslint-plugin-react-naming-convention

Setup

// eslint.config.js

// @ts-check
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: {
    // Put rules you want to use here
    "react-naming-convention/component-name": "warn",
  },
});

Rules

https://eslint-react.xyz/docs/rules/overview#naming-convention-rules

Package Sidebar

Install

npm i eslint-plugin-react-naming-convention

Weekly Downloads

238,155

Version

1.48.4

License

MIT

Unpacked Size

43.2 kB

Total Files

7

Last publish

Collaborators

  • rel1cx