A CLI tool that scans React projects for code patterns incompatible with React Compiler. Version 0.1.11, pre-1.0 with monthly releases. Detects legacy patterns (string refs, Legacy Context), impure renders (setTimeout, fetch in render), improper hook usage (hooks in loops/conditions), direct state mutations, and dynamic objects. Provides actionable suggestions. Lightweight, zero-config, integrates with ESLint via optional plugin. Unlike React Compiler's built-in checks, this is a standalone diagnostics tool for existing codebases.
npm install react-compiler-checkNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Scans all .js/.jsx/.ts/.tsx files in ./src for React Compiler incompatibilities and displays actionable diagnostics.
Install typescript as a dev dependency: npm install --save-dev typescript
Run tool on each package directory separately or use a glob pattern if supported (currently not).
Cross-check with React Compiler's own validation. Contribute to the tool to refine rules.
Update scripts parsing CLI output or switch to programmatic API with run().
Install locally: npm install react-compiler-check --save-dev. Or use npx: npx react-compiler-check
Use import { run } from 'react-compiler-check'Use require('react-compiler-check') or configure your bundler to handle ESM.