react-doctor README

The project's README from github.com/millionco/react-doctor. As one markdown file: README.md.

React Doctor

version downloads

React Doctor runs deterministic checks on your code. It reports issues in state and effects, performance, architecture, security, accessibility, and maintainability.

Supports React projects built with Next.js, Vite, Astro, TanStack, React Native, and Expo.

Documentation →

Install

1. Run a scan

Run this command from your project root:

npx react-doctor@latest

https://github.com/user-attachments/assets/07cc88d9-9589-44c3-aa73-5d603cb1c570

2. Install for agents

Install the skill to help your coding agent find and fix React issues:

npx react-doctor@latest install

Supports coding agents including Claude Code, Cursor, Codex, and OpenCode.

3. Run in CI

Scan each pull request and report the issues it introduces:

npx react-doctor@latest ci install

CI docs →

4. Configure rules

Choose rules and scan settings in doctor.config.ts.

With customRulesOnly: true, explicit rules settings of "warn" or "error" enable selected ported rules. Legacy rule names also work. Other ported rules and the React Compiler plugin stay off.

Configuration docs →

Runtime performance traces

Record a Chrome DevTools performance trace while you interact with a running React app:

npx react-doctor@latest scan http://localhost:3000

Runtime trace docs →

Telemetry

The CLI collects crash reports and anonymous usage data. See Data use for details.

To opt out, run: npx react-doctor@latest --no-telemetry

Contributing

Report an issue

MIT-licensed

react-doctor (millionco/react-doctor)

Searching Database…

What is this?React Doctor is a code-review tool that scans React code for the kind of mistakes AI coding agents tend to introduce, so bad patterns get caught before they ship.
Is this a linter, or something bigger?It behaves like a specialized diagnostic linter (a 'doctor' check) focused on React-specific antipatterns rather than a general-purpose framework or full code formatter.
How do I get it running?Clone the monorepo, install dependencies with 'pnpm install', then build with 'pnpm build'; the package's own dev loop runs via Turborepo with 'turbo run dev --filter=react-doctor'.
What do I need installed first?Node.js 20.19+ (or 22.13+) and pnpm 8+ are required, as declared in the project's engines field.
Does it run automatically in CI?The repo includes a dedicated react-doctor.yml GitHub Actions workflow, suggesting it's meant to be wired into CI pipelines to flag issues on every change.
Why call it a 'doctor'?Like similar 'doctor' tools (e.g. flutter doctor), it diagnoses problems in your codebase instead of just reformatting it.
Is it a single package or part of something bigger?It's one package (packages/react-doctor) inside a larger pnpm/Turborepo monorepo that also includes performance benchmarking scripts.
Creator
millionco
Size
128.7 MB
Stars
15.2K
Age
9mo
Commits · 90 Days