Quickstart
Run React Doctor locally, review the highest-severity findings, then add the same scan to pull requests.
1. Run the CLI
Run React Doctor from the project root:
npx react-doctor@latestReact Doctor detects your framework, React version, and rule set. It prints a health score and the issues it found. Start with security risks and performance regressions before lower-risk diagnostics.
To report only issues introduced on your branch, use the changed scope:
npx react-doctor@latest --scope changed2. Fix the issues
Re-scan as you work, starting with security, performance, and error diagnostics:
npx react-doctor@latest --verbose --scope changedThe changed scope compares your branch with its merge base and reports only new diagnostics. Fix error diagnostics before warnings. See How to fix issues.
3. Add it to CI
Install the continuous integration (CI) workflow:
npx react-doctor@latest ci installReact Doctor writes .github/workflows/react-doctor.yml. The default workflow reports new pull request findings without blocking the merge. Use react-doctor ci config when you want to change the gate, scan scope, or reporting. See GitHub Actions setup.
Next steps
- Install for coding agents: teach your agent to scan after React changes
- Configuration: tune rules, categories, and surfaces
- CLI reference: every command and flag