react/compiler/packages/eslint-plugin-react-compiler
2024-03-25 15:00:34 -04:00
..
__tests__ [linter] rename ReactForgetDiagnostics to ReactCompilerRule 2024-03-14 11:53:32 -04:00
src [linter] rename ReactForgetDiagnostics to ReactCompilerRule 2024-03-14 11:53:32 -04:00
babel.config.js Rename eslint-plugin-react-forget to eslint-plugin-react-compiler 2024-01-16 17:36:37 -05:00
package.json [eslint] Update devDep to match types 2024-03-25 15:00:34 -04:00
README.md Rename eslint-plugin-react-forget to eslint-plugin-react-compiler 2024-01-16 17:36:37 -05:00
rollup.config.js Rename eslint-plugin-react-forget to eslint-plugin-react-compiler 2024-01-16 17:36:37 -05:00
tsconfig.json Rename eslint-plugin-react-forget to eslint-plugin-react-compiler 2024-01-16 17:36:37 -05:00

eslint-plugin-react-compiler

ESLint plugin surfacing problematic React code found by the React compiler.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-react-compiler:

npm install eslint-plugin-react-compiler --save-dev

Usage

Add react-compiler to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "react-compiler"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "react-compiler/rule-name": 2
    }
}

Rules

TODO: Run eslint-doc-generator to generate the rules list.