react/compiler/packages/eslint-plugin-react-compiler
Ahmed Abdelbaset f7ee804c22
[compiler] Add git info to package.json files in compiler packages (#30475)
This PR adds the repository field to `compiler/packages/*/package.json`

| eslint-plugin-react-compiler | eslint-plugin-react-hooks |
| --- | --- |
|
![image](https://github.com/user-attachments/assets/3392a496-1ff1-4f36-ab96-cfbe1ed88693)
|
![image](https://github.com/user-attachments/assets/b0605dba-eef7-44fe-9484-979b4814d9fb)
|
2024-07-26 12:56:39 -04:00
..
__tests__ Compiler: unfork prettier config (#30205) 2024-07-18 17:00:24 -04:00
src [compiler][eslint] remove compilationMode override; report bailouts on first line 2024-07-23 14:24:36 -04:00
babel.config.js Compiler: unfork prettier config (#30205) 2024-07-18 17:00:24 -04:00
package.json [compiler] Add git info to package.json files in compiler packages (#30475) 2024-07-26 12:56:39 -04:00
README.md [React Compiler] Fix rule name for ESLint plugin (#29096) 2024-05-16 12:36:22 -04:00
rollup.config.js Compiler: unfork prettier config (#30205) 2024-07-18 17:00:24 -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/react-compiler": "error"
    }
}

Rules

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