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

1.52.2 • Public • Published

eslint-plugin-react-x

A set of composable ESLint rules for for libraries and frameworks that use React as a UI runtime.

Install

# npm
npm install --save-dev eslint-plugin-react-x

Setup

// eslint.config.js

// @ts-check
import js from "@eslint/js";
import react from "eslint-plugin-react-x";
import tseslint from "typescript-eslint";

export default tseslint.config({
  files: ["**/*.ts", "**/*.tsx"],
  extends: [
    js.configs.recommended,
    tseslint.configs.recommended,
    react.configs.recommended,
  ],
  languageOptions: {
    parser: tseslint.parser,
    parserOptions: {
      projectService: true,
      tsconfigRootDir: import.meta.dirname,
    },
  },
  rules: {
    // Put rules you want to override here
    "react-x/no-class-component": "warn",
  },
});

Rules

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

Package Sidebar

Install

npm i eslint-plugin-react-x

Weekly Downloads

278,447

Version

1.52.2

License

MIT

Unpacked Size

356 kB

Total Files

7

Last publish

Collaborators

  • rel1cx