← Open Source

Your agent writes bad React. This catches it.

ApplicationsCodingProductivityTypeScript
Momentum
+1stars in 24 hours+0.0%
15.3k
Stars
508
Forks
+88
This week
17
Contributors
Created 2026-02-13 · Updated 2026-12-06 · #4701 today
Top developers
README

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
Main.mp4

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

When a Git comparison cannot verify Stencil JSX compiler settings, it skips baseline attribution for uncertain class findings. The CLI names the affected paths on stderr in JSON mode. Other findings still count toward the CI gate.

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.

Mixed classic and automatic JSX projects can use automaticJsxRuntimeFiles to tell the opt-in JSX scope rule which exact project-relative paths use the automatic transform.

For a component that renders a fixed list supplied by its caller, you can declare a specific prop path in fixedIndexKeyLists. React Doctor checks the exact file, component export, and prop path and still reports index keys on other lists. Use this only when the length and the item at each position stay fixed for each mounted component instance.

{
  "fixedIndexKeyLists": [
    { "file": "src/Banner.tsx", "componentExport": "default", "propPath": ["banner", "labels"] }
  ]
}

The rule recognizes direct maps to text-only span elements whose position depends on the index.

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

Nearby in the ranking
Similar items

AI Rank for iPhone

Follow AI model rankings

Download on the App Store