react-compiler-healthcheck
raw JSON → 1.0.0 verified Sat Apr 25 auth: no javascript
A standalone health check script for React applications to detect violations of the Rules of React that could cause issues with the React Compiler (formerly React Forget). v1.0.0 is the initial release, distributed via npx, designed to be run once per codebase. It scans source files for patterns that break the Rules of React (e.g., mutating state, conditional hooks) and reports them. Unlike eslint-plugin-react-hooks which lints during development, this is a separate, one-time analysis tool. Maintained by the React team at Meta. Release cadence is low; expect minor updates for bug fixes.
Common errors
error Error: Cannot find module 'react-compiler-healthcheck' ↓
cause Running the tool without npx, e.g., calling it as a standalone command.
fix
Use 'npx react-compiler-healthcheck@latest' instead.
Warnings
gotcha The tool may report false positives for patterns that are safe but structurally similar to violations. ↓
fix Review each warning manually and consider adjusting code to be more explicit.
gotcha Does not replace eslint-plugin-react-hooks; both can be used complementarily. ↓
fix Run both eslint-plugin-react-hooks and this health check for comprehensive coverage.
Install
npm install react-compiler-healthcheck yarn add react-compiler-healthcheck pnpm add react-compiler-healthcheck Imports
- default (npx command)
npx react-compiler-healthcheck@latest
Quickstart
npx react-compiler-healthcheck@latest