react-doctor

millionco活跃维护

专治 AI 代理写出的烂 React 代码,自动做代码审查并揪出常见反模式和坏习惯,帮你在合并前把问题拦下来。

Your agent writes bad React. This catches it

[email protected]发布于 2026-11-02 02:40 UTC15,117star +14 / 7 天499fork同步于 2026-11-10 11:26 UTC

怎么上手

由 README 提炼,执行前请确认
npx react-doctor@latest
npx react-doctor@latest install
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

对 React 代码做确定性检查,抓出状态、性能、安全、可访问性等问题

专治 AI 代理写出的烂 React 代码,自动做代码审查并揪出常见反模式和坏习惯,帮你在合并前把问题拦下来。

核心能力

  • 对代码运行确定性静态检查,覆盖状态与副作用、性能、架构、安全、可访问性和可维护性
  • 支持 Next.js、Vite、Astro、TanStack、React Native 和 Expo 项目
  • 提供 install 子命令,为 Claude Code、Cursor、Codex、OpenCode 等编码代理安装修复技能
  • 提供 ci install 子命令,在 PR 上扫描并报告新引入的问题
  • 可录制 Chrome DevTools 运行时性能 trace 并扫描本地运行的应用

容易踩的坑

CLI 默认收集崩溃报告和匿名使用数据,需加 --no-telemetry 关闭;规则和扫描设置需在 doctor.config.ts 中配置;运行时 trace 扫描需先启动本地应用并传入 URL

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本[email protected]
  1. [email protected]2026-11-02 · 2026-11-02 02:41 UTC
    查看更新说明

    Patch Changes

  2. [email protected]2026-11-02 · 2026-11-02 02:40 UTC
    查看更新说明

    Patch Changes

    • #2326 ad51b5a Thanks @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-chain and rendering-hydration-no-flicker also stop skipping effects with proven empty or read-only inline cleanups. Unknown cleanup factories and other effectful returns remain conservative.
  3. [email protected]最新正式版2026-11-02 · 2026-11-02 02:40 UTC

    Patch Changes

    • #2327 49ee624 Thanks @aidenybai! - Pin eslint-plugin-react-hooks to 7.1.1, the version the lockfile resolves, so react-hooks-js/* diagnostics do not change when a new plugin release ships.

    • #2328 13ff2a0 Thanks @aidenybai! - --scope changed --include-untracked now 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]:

  4. [email protected]2026-11-01 · 2026-11-01 07:02 UTC
    查看更新说明

    Patch Changes

  5. [email protected]2026-11-01 · 2026-11-01 05:40 UTC
    查看更新说明

    Patch Changes

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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