CLI 默认收集崩溃报告和匿名使用数据,需加 --no-telemetry 关闭;规则和扫描设置需在 doctor.config.ts 中配置;运行时 trace 扫描需先启动本地应用并传入 URL
react-doctor
millionco活跃维护专治 AI 代理写出的烂 React 代码,自动做代码审查并揪出常见反模式和坏习惯,帮你在合并前把问题拦下来。
Your agent writes bad React. This catches it
npx react-doctor@latest
npx react-doctor@latest installREADME 未说明
对 React 代码做确定性检查,抓出状态、性能、安全、可访问性等问题
专治 AI 代理写出的烂 React 代码,自动做代码审查并揪出常见反模式和坏习惯,帮你在合并前把问题拦下来。
核心能力
- 对代码运行确定性静态检查,覆盖状态与副作用、性能、架构、安全、可访问性和可维护性
- 支持 Next.js、Vite、Astro、TanStack、React Native 和 Expo 项目
- 提供 install 子命令,为 Claude Code、Cursor、Codex、OpenCode 等编码代理安装修复技能
- 提供 ci install 子命令,在 PR 上扫描并报告新引入的问题
- 可录制 Chrome DevTools 运行时性能 trace 并扫描本地运行的应用
容易踩的坑
- [email protected]2026-11-02 · 2026-11-02 02:41 UTC
查看更新说明
Patch Changes
- Updated dependencies [
ad51b5a]:
- Updated dependencies [
- [email protected]2026-11-02 · 2026-11-02 02:40 UTC
查看更新说明
Patch Changes
- #2326
ad51b5aThanks @aidenybai! - Treat an effect cleanup that only reads a proven local runtime binding as empty. Preserve cleanup exemptions for global identifiers and member reads that can run getters, and keep no-op filtering conservative in other rules.no-mirror-prop-effect,no-event-trigger-state,no-effect-event-handler,no-effect-chainandrendering-hydration-no-flickeralso stop skipping effects with proven empty or read-only inline cleanups. Unknown cleanup factories and other effectful returns remain conservative.
- #2326
Patch Changes
-
#2327
49ee624Thanks @aidenybai! - Pineslint-plugin-react-hooksto 7.1.1, the version the lockfile resolves, soreact-hooks-js/*diagnostics do not change when a new plugin release ships. -
#2328
13ff2a0Thanks @aidenybai! ---scope changed --include-untrackednow treats a tracked file that was deleted and recreated at an untracked path as a rename, so its existing findings match the base instead of being reported as new and fixed. -
Updated dependencies [
ad51b5a]:
-
- [email protected]2026-11-01 · 2026-11-01 07:02 UTC
- [email protected]2026-11-01 · 2026-11-01 05:40 UTC
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
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.
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
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.
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
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
MIT-licensed