JSPM

eslint-plugin-react-naming-convention

1.30.1-beta.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 257330
  • Score
    100M100P100Q191846F
  • License MIT

ESLint React's ESLint plugin for naming convention related rules.

Package Exports

    Readme

    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,
        },
      },
      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