fix
[!NOTE] Medium Risk Large new, end-to-end implementation (CLI + config loading + git diff file filtering + native codebase graph analysis + oxlint integration) that can impact correctness/performance and CI behavior, but it is introduced as a new isolated package.
Overview Introduces a new
react-doctor-v2package that scaffolds the v2 rewrite, including areact-doctorCLI entrypoint and typed SDK exports.Adds config discovery/validation (
react-doctor.config.json/package.json#reactDoctor), richer error types, scoring + JSON reporting, and issue filtering (ignore rules/files/overrides, inline disables, and React Native raw-text suppressions).Implements native codebase analysis (workspace discovery, source/entrypoint discovery, AST import/export extraction, and module graph construction with reachability/reference tracking) and wires it into project inspection alongside an
oxlintrunner, with CLI support for changed-file modes via git (--staged/--unstaged/--changed/--diff) and--fail-onexit behavior.Reviewed by Cursor Bugbot for commit 751bbd256b1e46d4084616d78056e4ef0be7668e. Bugbot is set up for automated code reviews on this repo. Configure here.
๐ด React Review โ 0/100 (unchanged) ยท 0 โ errors ยท 523 โ ๏ธ warnings
Copy prompt for agent
Check if these React Review issues are valid. If so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
Run this before and after your changes to verify the result:
npx react-doctor@latest --verbose --diff
Do not modify the react-doctor configuration unless explicitly asked.
Fix the underlying code issues instead of changing or suppressing the rules.
React Review found 0 errors and 523 warnings. This PR leaves the React health score unchanged.
<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-prevent-default.ts">
<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-prevent-default.ts:2">
Severity: Warning
Import from barrel/index file โ import directly from the source module for better tree-shaking
Import from the direct path: `import { Button } from './components/Button'` instead of `./components`
Rule: `no-barrel-import`
</violation>
</file>
<file name="packages/react-doctor-v2/src/core/rules/lint/performance/no-usememo-simple-expression.ts">
<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/no-usememo-simple-expression.ts:2">
Severity: Warning
Import from barrel/index file โ import directly from the source module for better tree-shaking
Import from the direct path: `import { Button } from './components/Button'` instead of `./components`
Rule: `no-barrel-import`
</violation>
</file>
<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-polymorphic-children.ts">
<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-polymorphic-children.ts:2">
Severity: Warning
Import from barrel/index file โ import directly from the source module for better tree-shaking
Import from the direct path: `import { Button } from './components/Button'` instead of `./components`
Rule: `no-barrel-import`
</violation>
</file>
<file name="packages/react-doctor-v2/src/core/rules/lint/performance/no-undeferred-third-party.ts">
<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/no-undeferred-third-party.ts:2">
Severity: Warning
Import from barrel/index file โ import directly from the source module for better tree-shaking
Import from the direct path: `import { Button } from './components/Button'` instead of `./components`
Rule: `no-barrel-import`
</violation>
</file>
<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-nested-component-definition.ts">
<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-nested-component-definition.ts:2">
Severity: Warning
Import from barrel/index file โ import directly from the source module for better tree-shaking
Import from the direct path: `import { Button } from './components/Button'` instead of `./components`
Rule: `no-barrel-import`
</violation>
</file>
<file name="packages/react-doctor-v2/src/core/rules/lint/performance/rerender-derived-state-from-hook.ts">
<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/rerender-derived-state-from-hook.ts:2">
Severity: Warning
Import from barrel/index file โ import directly from the source module for better tree-shaking
Import from the direct path: `import { Button } from './components/Button'` instead of `./components`
Rule: `no-barrel-import`
</violation>
</file>
<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-mutable-in-deps.ts">
<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-mutable-in-deps.ts:2">
Severity: Warning
Import from barrel/index file โ import directly from the source module for better tree-shaking
Import from the direct path: `import { Button } from './components/Button'` instead of `./components`
Rule: `no-barrel-import`
</violation>
</file>
<file name="packages/react-doctor-v2/src/core/rules/lint/performance/rendering-usetransition-loading.ts">
<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/rendering-usetransition-loading.ts:2">
Severity: Warning
Import from barrel/index file โ import directly from the source module for better tree-shaking
Import from the direct path: `import { Button } from './components/Button'` instead of `./components`
Rule: `no-barrel-import`
</violation>
</file>
<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-mirror-prop-effect.ts">
<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-mirror-prop-effect.ts:2">
Severity: Warning
Import from barrel/index file โ import directly from the source module for better tree-shaking
Import from the direct path: `import { Button } from './components/Button'` instead of `./components`
Rule: `no-barrel-import`
</violation>
<violation number="2" location="packages/react-doctor-v2/src/core/rules/lint/react/no-mirror-prop-effect.ts:103">
Severity: Warning
array.find() in a loop is O(n*m) โ build a Map for O(1) lookups
Build an index `Map` once outside the loop instead of `array.find(...)` inside it
Rule: `js-index-maps`
</violation>
</file>
<file name="packages/react-doctor-v2/src/core/rules/lint/performance/rendering-script-defer-async.ts">
<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/rendering-script-defer-async.ts:2">
Severity: Warning
Import from barrel/index file โ import directly from the source module for better tree-shaking
Import from the direct path: `import { Button } from './components/Button'` instead of `./components`
Rule: `no-barrel-import`
</violation>
</file>
<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-many-boolean-props.ts">
<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-many-boolean-props.ts:2">
Severity: Warning
Import from barrel/index file โ import directly from the source module for better tree-shaking
Import from the direct path: `import { Button } from './components/Button'` instead of `./components`
Rule: `no-barrel-import`
</violation>
</file>
<file name="packages/react-doctor-v2/src/core/rules/lint/performance/rendering-resource-hints.ts">
<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/rendering-resource-hints.ts:2">
Severity: Warning
Import from barrel/index file โ import directly from the source module for better tree-shaking
Import from the direct path: `import { Button } from './components/Button'` instead of `./components`
Rule: `no-barrel-import`
</violation>
<violation number="2" location="packages/react-doctor-v2/src/core/rules/lint/performance/rendering-resource-hints.ts:45">
Severity: Warning
array.includes() in a loop is O(n) per call โ convert to a Set for O(1) lookups
Use a `Set` or `Map` for repeated membership tests / keyed lookups โ `Array.includes`/`find` is O(n) per call
Rule: `js-set-map-lookups`
</violation>
</file>
<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-legacy-context-api.ts">
<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-legacy-context-api.ts:2">
Severity: Warning
Import from barrel/index file โ import directly from the source module for better tree-shaking
Import from the direct path: `import { Button } from './components/Button'` instead of `./components`
Rule: `no-barrel-import`
</violation>
</file>
Showing 15 of 523 issues.
Reviewed by react-review for commit e28aea5763e0f5868f9f797f819116c4aeea19eb. Configure here.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| react-doctor-website | Preview, Comment | May 13, 2026 5:04am |