react/compiler/packages/eslint-plugin-react-compiler
lauren c8c89fab5b
[compiler] Update rollup plugins (#31919)
Update our various compiler rollup plugins.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31919).
* #31927
* #31918
* #31917
* #31916
* __->__ #31919
2025-01-02 11:24:26 -05:00
..
__tests__ [compiler] Surface unused opt out directives in eslint 2024-08-16 18:12:05 -04:00
src Revert "Replace deprecated dependency in eslint-plugin-react-compiler" (#31665) 2024-12-03 11:46:08 -05:00
babel.config.js Compiler: unfork prettier config (#30205) 2024-07-18 17:00:24 -04:00
package.json Revert "Replace deprecated dependency in eslint-plugin-react-compiler" (#31665) 2024-12-03 11:46:08 -05:00
README.md [React Compiler] Fix rule name for ESLint plugin (#29096) 2024-05-16 12:36:22 -04:00
rollup.config.js [compiler] Update rollup plugins (#31919) 2025-01-02 11:24:26 -05: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/react-compiler": "error"
    }
}

Rules

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