react/compiler/packages/eslint-plugin-react-compiler
Sathya Gunsasekaran 8d234c64eb [hir] Remove hermes parser
Exporting the hermes parser breaks the playground
as the hermes parser can not work in the browser.

No one is using this directly anyway -- snap and
others bundle hermes parser on their own, so,
let's remove it.

ghstack-source-id: d448c346eb137f8ba6ada4ad113e41a90b29baff
Pull Request resolved: https://github.com/facebook/react-forget/pull/2890
2024-04-23 12:28:42 +01:00
..
__tests__ [dx] Improve error message from InferReferenceEffects 2024-04-22 08:14:35 -07:00
src [hir] Remove hermes parser 2024-04-23 12:28:42 +01:00
babel.config.js Rename eslint-plugin-react-forget to eslint-plugin-react-compiler 2024-01-16 17:36:37 -05:00
package.json [hir] Remove hermes parser 2024-04-23 12:28:42 +01: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.