compiler/packages/eslint-plugin-react-compiler/README.md MARKDOWN 64 lines View on github.com → Search inside
1# eslint-plugin-react-compiler23ESLint plugin surfacing problematic React code found by the React compiler.45## Installation67You'll first need to install [ESLint](https://eslint.org/):89```sh10npm i eslint --save-dev11```1213Next, install `eslint-plugin-react-compiler`:1415```sh16npm install eslint-plugin-react-compiler --save-dev17```1819## Usage2021### Flat config2223Edit your eslint 8+ config (for example `eslint.config.mjs`) with the recommended configuration:2425```diff26+ import reactCompiler from "eslint-plugin-react-compiler"27import react from "eslint-plugin-react"2829export default [30    // Your existing config31    { ...pluginReact.configs.flat.recommended, settings: { react: { version: "detect" } } },32+   reactCompiler.configs.recommended    33]34```3536### Legacy config (`.eslintrc`)3738Add `react-compiler` to the plugins section of your configuration file. You can omit the `eslint-plugin-` prefix:3940```json41{42    "plugins": [43        "react-compiler"44    ]45}46```474849Then configure the rules you want to use under the rules section.5051```json52{53    "rules": {54        "react-compiler/react-compiler": "error"55    }56}57```5859## Rules6061<!-- begin auto-generated rules list -->62TODO: Run eslint-doc-generator to generate the rules list.63<!-- end auto-generated rules list -->

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.