react/compiler/packages/eslint-plugin-react-compiler
Lauren Tan 84d28ebcc5 Default to raising all errors in eslint plugin
We control what gets reported via another function anyway so it's better
to raise everything at the compiler config level. This lets us configure
what level of diagnostic is reportable later

ghstack-source-id: 996d3cbb8d8f3e1bbe943210b8d633420e0f3f3b
Pull Request resolved: https://github.com/facebook/react-forget/pull/2935
2024-05-06 20:07:35 -04:00
..
__tests__ [dx] Improve error message from InferReferenceEffects 2024-04-22 08:14:35 -07:00
src Default to raising all errors in eslint plugin 2024-05-06 20:07:35 -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 Remove duplicated hermes-parser 2024-04-30 21:34:36 -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 Standardize on banner2 plugin 2024-04-02 12:13:41 -04:00
tsconfig.json Remove comments in builds 2024-04-02 10:32:24 -04: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.