JSPM

eslint-plugin-react-naming-convention

2.0.0-next.21
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 257330
  • Score
    100M100P100Q191732F
  • License MIT

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

Package Exports

  • eslint-plugin-react-naming-convention
  • eslint-plugin-react-naming-convention/package.json

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