react-doctor README

README проекта с github.com/millionco/react-doctor. Одним файлом markdown: 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)

Ищем в базе…

Что это такое?React Doctor — это инструмент для код-ревью, который проверяет React-код на ошибки, которые обычно допускают ИИ-агенты для написания кода, чтобы такие плохие шаблоны находились до того, как попадут в продакшен.
Это линтер или что-то более крупное?Это специализированный диагностический линтер (проверка в духе 'doctor'), который ищет антипаттерны, характерные именно для React, а не универсальный фреймворк или полноценный форматировщик кода.
Как это запустить?Клонируйте монорепозиторий, установите зависимости командой 'pnpm install', затем соберите проект командой 'pnpm build'; цикл разработки самого пакета запускается через Turborepo командой 'turbo run dev --filter=react-doctor'.
Что нужно установить заранее?Необходимы Node.js 20.19+ (или 22.13+) и pnpm 8+, как указано в поле engines файла проекта.
Он запускается автоматически в CI?В репозитории есть отдельный файл react-doctor.yml с рабочим процессом GitHub Actions, что говорит о том, что инструмент предназначен для подключения к процессам CI, чтобы отмечать проблемы при каждом изменении.
Почему его назвали 'doctor'?Как и подобные инструменты 'doctor' (например, flutter doctor), он диагностирует проблемы в вашей кодовой базе, а не просто переформатирует её.
Это один пакет или часть чего-то большего?Это один пакет (packages/react-doctor) внутри большого монорепозитория pnpm/Turborepo, который также включает скрипты для замеров производительности.
Какие есть похожие проекты?super-linter, perch, desloppify, commitlint, lint, openqodex, fallow, landmines
Автор
millionco
Размер
128.7 MB
Звёзды
15.2K
Возраст
9 мес
Коммиты · 90 дней