Quickstart
Run React Doctor locally, fix security and performance findings first, then check every pull request.
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 scan only changed files, add --diff:
npx react-doctor@latest --diff2. Fix the issues
Re-scan as you work, starting with security, performance, and error diagnostics:
npx react-doctor@latest --verbose --diff--diff scans only the files you changed. Fix security and performance diagnostics first, then other error diagnostics. See How to fix issues.
3. Add it to CI
Run the installer. Choose Yes when it asks to add React Doctor to GitHub Actions:
npx react-doctor@latest installReact Doctor writes .github/workflows/react-doctor.yml and adds a doctor package script. On each pull request, it posts security, performance, and correctness findings in a summary comment, inline review comments, and a commit status. See GitHub Actions setup.
Next steps
- CLI to CI: run locally, then add the same check to pull requests
- Configuration: tune rules, categories, and surfaces
- CLI reference: every command and flag