import { DocsFeatureList } from "@/components/docs/docs-feature-list";
import { DocsWorkflow } from "@/components/docs/docs-workflow";

# What is React Doctor?

React Doctor is a deterministic scanner for React codebases. It finds issues across state and effects, performance, architecture, security, accessibility, and framework-specific patterns.

It is built for teams using React directly, Next.js, Vite, TanStack, React Native, Expo, and similar React stacks.

## Why use it?

React Doctor gives you a repeatable way to find React problems that coding agents and normal lint rules often miss.

Use it to:

<DocsFeatureList
  items={[
    {
      icon: "audit",
      text: "Audit a project locally",
      href: "/docs/getting-started/run-your-first-scan",
    },
    {
      icon: "branch",
      text: "Review only files changed in a branch",
      href: "/docs/getting-started/run-your-first-scan",
    },
    {
      icon: "annotations",
      text: "Add sticky and inline PR comments",
      href: "/docs/ci-and-prs/github-actions-setup",
    },
    {
      icon: "teach",
      text: "Teach coding agents the project's React quality bar",
      href: "/docs/getting-started/install-for-coding-agents",
    },
    {
      icon: "watch",
      text: "Keep staged-file feedback visible before commits",
      href: "/docs/getting-started/skills-and-recurring-usage",
    },
  ]}
/>

## How it fits with linting

React Doctor is not a replacement for your existing lint setup. It can run as a CLI, as a CI check, or through standalone oxlint and ESLint plugins.

The CLI also respects existing ignore files and can adopt JSON ESLint or oxlint rule settings when available.

## Typical workflow

<DocsWorkflow
  steps={[
    {
      title: "Run React Doctor to setup",
      description: "Paste the following command into your terminal",
      command: "npx react-doctor@latest",
    },
    {
      title: "Use verbose mode",
      description: "For day-to-day work, continue with verbose mode",
      command: "npx react-doctor@latest --verbose --diff",
    },
  ]}
/>
