React Doctor

React Doctor scans your React codebase for security, performance, correctness, and architecture issues. One command gives you a 0–100 health score with actionable diagnostics.

What it does

  1. Detects your setup - Automatically figures out if you’re using Next.js, Vite, Remix, React Native, etc., plus your React version and compiler config.

  2. Runs two analysis passes in parallel:

    • Lint: 60+ rules across state & effects, performance, architecture, bundle size, security, correctness, accessibility, and framework-specific categories. Rules toggle automatically based on your project.
    • Dead code: Finds unused files, exports, types, and duplicates.
  3. Scores everything - Errors weigh more than warnings. Results in a 0–100 score:

    • 75+ = Great
    • 50–74 = Needs work
    • <50 = Critical

How to use it

Run from your project root:

npx -y react-doctor@latest .

Add --verbose to see file details and line numbers:

npx -y react-doctor@latest . --verbose

Options

Config

Create react-doctor.config.json to ignore specific rules or files:

{
  "ignore": {
    "rules": ["react/no-danger", "jsx-a11y/no-autofocus"],
    "files": ["src/generated/**"]
  }
}

For coding agents

Install as a skill to teach your agent 47+ React best practices:

curl -fsSL https://react.doctor/install-skill.sh | bash

Works with Cursor, Claude Code, Amp Code, Codex, Gemini CLI, OpenCode, Windsurf, and Antigravity.

GitHub Action

Add to your workflow for automated checks:

- uses: millionco/react-doctor@v1

More details on the GitHub repo.

Date
19.02.2026
Categories
Tags