by React team · eslint-plugin-react-hooks
The Rules of Hooks, exhaustive dependencies and the React Compiler checks maintained by the React team.
pnpm add -D eslint eslint-plugin-react-hooks// eslint.config.js
import reactHooks from "eslint-plugin-react-hooks";
export default [
reactHooks.configs.flat.recommended,
];| Rule | Severity | Linters | Reach | Trend |
|---|---|---|---|---|
| react-hooks/exhaustive-deps | warn | In ESLint, Oxlint, Biome | 199.8M | +35.4% |
| react-hooks/rules-of-hooks | error | In ESLint, Oxlint, Biome | 199.8M | +35.4% |
| react-hooks/error-boundaries | error | In ESLint, Oxlint | 164.5M | +28.3% |
| react-hooks/globals | error | In ESLint, Oxlint | 164.5M | +28.3% |
| react-hooks/immutability | error | In ESLint, Oxlint | 164.5M | +28.3% |
| react-hooks/incompatible-library | warn | In ESLint, Oxlint | 164.5M | +28.3% |
| react-hooks/preserve-manual-memoization | error | In ESLint, Oxlint | 164.5M | +28.3% |
| react-hooks/purity | error | In ESLint, Oxlint | 164.5M | +28.3% |
| react-hooks/refs | error | In ESLint, Oxlint | 164.5M | +28.3% |
| react-hooks/set-state-in-effect | error | In ESLint, Oxlint | 164.5M | +28.3% |
| react-hooks/set-state-in-render | error | In ESLint, Oxlint | 164.5M | +28.3% |
| react-hooks/static-components | error | In ESLint, Oxlint | 164.5M | +28.3% |
| react-hooks/unsupported-syntax | warn | In ESLint, Oxlint | 164.5M | +28.3% |
| react-hooks/use-memo | error | In ESLint, Oxlint | 164.5M | +28.3% |
| react-hooks/config | error | In ESLint | 164.5M | +28.3% |
| react-hooks/gating | error | In ESLint | 164.5M | +28.3% |