# eslint-plugin-react-compiler

> ESLint plugin to display errors found by the React compiler.

Latest version **19.1.0-rc.2** (published 2025-05-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-react-compiler
pnpm add eslint-plugin-react-compiler
yarn add eslint-plugin-react-compiler
bun add eslint-plugin-react-compiler
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; high quality score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 19.1.0-rc.2 |
| Published | 2025-05-14 |
| First published | 2024-02-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | ^14.17.0 \|\| ^16.0.0 \|\| >= 18.0.0 |
| Dependencies | 6 |
| Unpacked size | 1.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 250606 |
| Maintainers | fb, react-bot |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-react-compiler
- Repository: https://github.com/facebook/react
- Homepage: https://github.com/facebook/react#readme
- Issues: https://github.com/facebook/react/issues
- npm.io page: https://npm.io/package/eslint-plugin-react-compiler

## Dependencies (6)

- [zod](https://npm.io/package/zod.md) ^3.22.4
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.24.4
- [@babel/parser](https://npm.io/package/@babel/parser.md) ^7.24.4
- [hermes-parser](https://npm.io/package/hermes-parser.md) ^0.25.1
- [zod-validation-error](https://npm.io/package/zod-validation-error.md) ^3.0.3
- [@babel/plugin-proposal-private-methods](https://npm.io/package/@babel/plugin-proposal-private-methods.md) ^7.18.6

## Recent versions

- 19.1.0-rc.2 (latest) — 2025-05-14
- 0.0.0-experimental-6cef588-20250815 (experimental) — 2025-08-15
- 19.0.0-beta-af1b7da-20250417 (beta) — 2025-04-21
- 0.0.0-experimental-6cef588-20250813 — 2025-08-13
- 0.0.0-experimental-6cef588-20250812 — 2025-08-12
- 0.0.0-experimental-6cef588-20250811 — 2025-08-11
- 0.0.0-experimental-6cef588-20250807 — 2025-08-07
- 0.0.0-experimental-3edd82f-20250806 — 2025-08-06
- 0.0.0-experimental-3edd82f-20250804 — 2025-08-05
- 0.0.0-experimental-8e21c63-20250804 — 2025-08-04
- 0.0.0-experimental-cffbb87-20250801 — 2025-08-01
- 0.0.0-experimental-cffbb87-20250731 — 2025-07-31
- 0.0.0-experimental-cffbb87-20250730 — 2025-07-30
- 0.0.0-experimental-10ec35e-20250729 — 2025-07-29
- 0.0.0-experimental-4e25a2e-20250728 — 2025-07-28
- … 261 more at https://npm.io/package/eslint-plugin-react-compiler/versions

## README

# eslint-plugin-react-compiler

ESLint plugin surfacing problematic React code found by the React compiler.

## Installation

You'll first need to install [ESLint](https://eslint.org/):

```sh
npm i eslint --save-dev
```

Next, install `eslint-plugin-react-compiler`:

```sh
npm install eslint-plugin-react-compiler --save-dev
```

## Usage

### Flat config

Edit your eslint 8+ config (for example `eslint.config.mjs`) with the recommended configuration:

```diff
+ import reactCompiler from "eslint-plugin-react-compiler"
import react from "eslint-plugin-react"

export default [
    // Your existing config
    { ...pluginReact.configs.flat.recommended, settings: { react: { version: "detect" } } },
+   reactCompiler.configs.recommended    
]
```

### Legacy config (`.eslintrc`)

Add `react-compiler` to the plugins section of your configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
    "plugins": [
        "react-compiler"
    ]
}
```


Then configure the rules you want to use under the rules section.

```json
{
    "rules": {
        "react-compiler/react-compiler": "error"
    }
}
```

## Rules

<!-- begin auto-generated rules list -->
TODO: Run eslint-doc-generator to generate the rules list.
<!-- end auto-generated rules list -->

---
_Source: https://npm.io/package/eslint-plugin-react-compiler · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
