Skip to content

fix#210

Open
aidenybai wants to merge 8 commits into
mainfrom
improve-v2
Open

fix#210
aidenybai wants to merge 8 commits into
mainfrom
improve-v2

Conversation

@aidenybai
Copy link
Copy Markdown
Member

@aidenybai aidenybai commented May 12, 2026

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-v2 package that scaffolds the v2 rewrite, including a react-doctor CLI 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 oxlint runner, with CLI support for changed-file modes via git (--staged/--unstaged/--changed/--diff) and --fail-on exit behavior.

Reviewed by Cursor Bugbot for commit 751bbd2. Bugbot is set up for automated code reviews on this repo. Configure here.

@reactreview
Copy link
Copy Markdown

reactreview Bot commented May 12, 2026

🔴 React Review0/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 e28aea5. Configure here.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-doctor-website Ready Ready Preview, Comment May 13, 2026 5:04am

@@ -0,0 +1,68 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/performance/rerender-memo-before-early-return.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/rerender-memo-before-early-return.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>

Reviewed by react-review for commit f176dcb. Configure here.

@@ -0,0 +1,9 @@
import type { EsTreeNode } from "../../utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import type { EsTreeNode } from "../../utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import type { EsTreeNode } from "../../utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/storybook/utils/is-user-event-call.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/storybook/utils/is-user-event-call.ts:1">
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>

Reviewed by react-review for commit f176dcb. Configure here.

@@ -0,0 +1,43 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<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>

Reviewed by react-review for commit f176dcb. Configure here.

@@ -0,0 +1,32 @@
import { defineRule } from "../../registry.js";
import { LOADING_STATE_PATTERN, isHookCall, isNodeOfType } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { LOADING_STATE_PATTERN, isHookCall, isNodeOfType } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { LOADING_STATE_PATTERN, isHookCall, isNodeOfType } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<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>

Reviewed by react-review for commit f176dcb. Configure here.

@@ -0,0 +1,50 @@
import { defineRule } from "../../registry.js";
import { STORY_FILE_PATTERN, isUserEventCall, isNodeOfType } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { STORY_FILE_PATTERN, isUserEventCall, isNodeOfType } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { STORY_FILE_PATTERN, isUserEventCall, isNodeOfType } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/storybook/storybook-await-play-interactions.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/storybook/storybook-await-play-interactions.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>

Reviewed by react-review for commit f176dcb. Configure here.

@@ -0,0 +1,45 @@
import { defineRule } from "../../registry.js";
import { isHookCall, isTriviallyCheapExpression, isNodeOfType } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { isHookCall, isTriviallyCheapExpression, isNodeOfType } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { isHookCall, isTriviallyCheapExpression, isNodeOfType } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<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>

Reviewed by react-review for commit f176dcb. Configure here.

@@ -0,0 +1,29 @@
import { defineRule } from "../../registry.js";
import { findJsxAttribute, hasJsxAttribute, isNodeOfType } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { findJsxAttribute, hasJsxAttribute, isNodeOfType } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { findJsxAttribute, hasJsxAttribute, isNodeOfType } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<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>

Reviewed by react-review for commit f176dcb. Configure here.

@@ -0,0 +1,41 @@
import { defineRule } from "../../registry.js";
import { isNodeOfType } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { isNodeOfType } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { isNodeOfType } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/performance/no-transition-all.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/no-transition-all.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>

Reviewed by react-review for commit f176dcb. Configure here.

@@ -0,0 +1,38 @@
import { defineRule } from "../../registry.js";
import { isNodeOfType } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { isNodeOfType } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { isNodeOfType } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/performance/no-scale-from-zero.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/no-scale-from-zero.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>

Reviewed by react-review for commit f176dcb. Configure here.

@@ -0,0 +1,35 @@
import { defineRule } from "../../registry.js";
import { isNodeOfType } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { isNodeOfType } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { isNodeOfType } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/performance/no-permanent-will-change.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/no-permanent-will-change.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>

Reviewed by react-review for commit f176dcb. Configure here.

@@ -0,0 +1,24 @@
import type { EsTreeNode } from "../../utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import type { EsTreeNode } from "../../utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import type { EsTreeNode } from "../../utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/utils/find-top-level-effect-calls.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/utils/find-top-level-effect-calls.ts:1">
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>

Reviewed by react-review for commit 491f6f0. Configure here.

@@ -0,0 +1,26 @@
import type { EsTreeNode } from "../../utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import type { EsTreeNode } from "../../utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import type { EsTreeNode } from "../../utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/tailwind/utils/find-class-name-literal.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/tailwind/utils/find-class-name-literal.ts:1">
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>

Reviewed by react-review for commit 491f6f0. Configure here.

@@ -0,0 +1,35 @@
import { defineRule } from "../../registry.js";
import { BARREL_INDEX_SUFFIXES } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { BARREL_INDEX_SUFFIXES } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { BARREL_INDEX_SUFFIXES } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/performance/no-barrel-import.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/no-barrel-import.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>

Reviewed by react-review for commit 491f6f0. Configure here.

@@ -0,0 +1,32 @@
import type { EsTreeNode } from "../../utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import type { EsTreeNode } from "../../utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import type { EsTreeNode } from "../../utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/utils/find-subscription-call.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/utils/find-subscription-call.ts:1">
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>

Reviewed by react-review for commit 491f6f0. Configure here.

@@ -0,0 +1,63 @@
import { defineRule } from "../../registry.js";
import { findJsxAttribute, isNodeOfType } from "../utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { findJsxAttribute, isNodeOfType } from "../utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { findJsxAttribute, isNodeOfType } from "../utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/performance/motion-no-motion-in-lazymotion-strict.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/motion-no-motion-in-lazymotion-strict.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>

Reviewed by react-review for commit 491f6f0. Configure here.

@@ -0,0 +1,47 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/performance/no-layout-property-animation.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/no-layout-property-animation.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>

Reviewed by react-review for commit 491f6f0. Configure here.

@@ -0,0 +1,52 @@
import type { EsTreeNode } from "../../utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import type { EsTreeNode } from "../../utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import type { EsTreeNode } from "../../utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/utils/extract-index-name.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/utils/extract-index-name.ts:1">
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>

Reviewed by react-review for commit 491f6f0. Configure here.

@@ -0,0 +1,32 @@
import type { EsTreeNode } from "../../utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import type { EsTreeNode } from "../../utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import type { EsTreeNode } from "../../utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/swr/utils/contains-unstable-swr-key-value.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/swr/utils/contains-unstable-swr-key-value.ts:1">
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>

Reviewed by react-review for commit 491f6f0. Configure here.

@@ -0,0 +1,23 @@
import { defineRule } from "../../registry.js";
import type { EsTreeNode, Rule, RuleContext } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import type { EsTreeNode, Rule, RuleContext } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import type { EsTreeNode, Rule, RuleContext } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/performance/no-moment.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/performance/no-moment.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>

Reviewed by react-review for commit 491f6f0. Configure here.

@@ -0,0 +1,26 @@
import { defineRule } from "../../registry.js";
import { SWR_HOOK_NAMES, containsUnstableSWRKeyValue, isNodeOfType } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { SWR_HOOK_NAMES, containsUnstableSWRKeyValue, isNodeOfType } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { SWR_HOOK_NAMES, containsUnstableSWRKeyValue, isNodeOfType } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/swr/swr-no-unstable-key.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/swr/swr-no-unstable-key.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>

Reviewed by react-review for commit 491f6f0. Configure here.

@@ -0,0 +1,45 @@
import { defineRule } from "../../registry.js";
import { EFFECT_HOOK_NAMES, isHookCall, walkAst, isNodeOfType } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { EFFECT_HOOK_NAMES, isHookCall, walkAst, isNodeOfType } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { EFFECT_HOOK_NAMES, isHookCall, walkAst, isNodeOfType } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/advanced-init-once.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/advanced-init-once.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>

Reviewed by react-review for commit 3b098da. Configure here.

@@ -0,0 +1,65 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/design/design-no-bold-heading.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/design/design-no-bold-heading.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>

Reviewed by react-review for commit 3b098da. Configure here.

const classNameLiteral = getClassNameLiteral(classAttribute);
if (classNameLiteral) {
for (const tailwindWeightToken of HEAVY_HEADING_TAILWIND_WEIGHTS) {
const tokenPattern = new RegExp(`(?:^|\\s)${tailwindWeightToken}(?:$|\\s|:)`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

new RegExp() inside a loop — hoist to a module-level constant

Hoist new RegExp(...) (or large regex literals) to a module-level constant so it isn't recompiled on every loop iteration

Rule: js-hoist-regexp

Disable js-hoist-regexp for this line
Suggested change
const tokenPattern = new RegExp(`(?:^|\\s)${tailwindWeightToken}(?:$|\\s|:)`);
// react-doctor-disable-next-line js-hoist-regexp
const tokenPattern = new RegExp(`(?:^|\\s)${tailwindWeightToken}(?:$|\\s|:)`);
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/design/design-no-bold-heading.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/design/design-no-bold-heading.ts:34">
Severity: Warning

new RegExp() inside a loop — hoist to a module-level constant

Hoist `new RegExp(...)` (or large regex literals) to a module-level constant so it isn't recompiled on every loop iteration

Rule: `js-hoist-regexp`
</violation>

</file>

Reviewed by react-review for commit 3b098da. Configure here.

@@ -0,0 +1,61 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/advanced-event-handler-refs.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/advanced-event-handler-refs.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>

Reviewed by react-review for commit 3b098da. Configure here.

@@ -0,0 +1,5 @@
import type { EsTreeNode } from "../../utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import type { EsTreeNode } from "../../utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import type { EsTreeNode } from "../../utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/utils/has-jsx-spread-attribute.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/utils/has-jsx-spread-attribute.ts:1">
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>

Reviewed by react-review for commit 3b098da. Configure here.


const getUsedPackages = (graph: ModuleGraph, workspace: WorkspaceInfo): Set<string> => {
const usedPackages = new Set([
...graph.packageUsages
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

.filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

Combine .map().filter() (or similar chains) into a single pass with .reduce() or a for...of loop to avoid iterating the array twice

Rule: js-combine-iterations

Disable js-combine-iterations for this line
Suggested change
...graph.packageUsages
// react-doctor-disable-next-line js-combine-iterations
...graph.packageUsages
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/codebase/dependencies.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/codebase/dependencies.ts:112">
Severity: Warning

.filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

Combine `.map().filter()` (or similar chains) into a single pass with `.reduce()` or a `for...of` loop to avoid iterating the array twice

Rule: `js-combine-iterations`
</violation>

</file>

Reviewed by react-review for commit 3b098da. Configure here.


const collectDuplicateDependencyDeclarations = (graph: ModuleGraph): DependencyFinding[] =>
graph.workspaces.flatMap((workspace) =>
[...workspace.dependencyNames]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

.filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

Combine .map().filter() (or similar chains) into a single pass with .reduce() or a for...of loop to avoid iterating the array twice

Rule: js-combine-iterations

Disable js-combine-iterations for this line
Suggested change
[...workspace.dependencyNames]
// react-doctor-disable-next-line js-combine-iterations
[...workspace.dependencyNames]
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/codebase/dependencies.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/codebase/dependencies.ts:176">
Severity: Warning

.filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

Combine `.map().filter()` (or similar chains) into a single pass with `.reduce()` or a `for...of` loop to avoid iterating the array twice

Rule: `js-combine-iterations`
</violation>

</file>

Reviewed by react-review for commit 3b098da. Configure here.

});

const collectUnlistedImportDependencies = (graph: ModuleGraph): DependencyFinding[] =>
graph.packageUsages
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

.filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

Combine .map().filter() (or similar chains) into a single pass with .reduce() or a for...of loop to avoid iterating the array twice

Rule: js-combine-iterations

Disable js-combine-iterations for this line
Suggested change
graph.packageUsages
// react-doctor-disable-next-line js-combine-iterations
graph.packageUsages
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/codebase/dependencies.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/codebase/dependencies.ts:197">
Severity: Warning

.filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

Combine `.map().filter()` (or similar chains) into a single pass with `.reduce()` or a `for...of` loop to avoid iterating the array twice

Rule: `js-combine-iterations`
</violation>

</file>

Reviewed by react-review for commit 3b098da. Configure here.


const collectUnlistedManifestDependencies = (graph: ModuleGraph): DependencyFinding[] =>
graph.workspaces.flatMap((workspace) =>
[...workspace.manifestDependencyNames]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

.filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

Combine .map().filter() (or similar chains) into a single pass with .reduce() or a for...of loop to avoid iterating the array twice

Rule: js-combine-iterations

Disable js-combine-iterations for this line
Suggested change
[...workspace.manifestDependencyNames]
// react-doctor-disable-next-line js-combine-iterations
[...workspace.manifestDependencyNames]
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/codebase/dependencies.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/codebase/dependencies.ts:213">
Severity: Warning

.filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

Combine `.map().filter()` (or similar chains) into a single pass with `.reduce()` or a `for...of` loop to avoid iterating the array twice

Rule: `js-combine-iterations`
</violation>

</file>

Reviewed by react-review for commit 3b098da. Configure here.


const collectUnlistedScriptDependencies = (graph: ModuleGraph): DependencyFinding[] =>
graph.workspaces.flatMap((workspace) =>
[...workspace.scriptDependencyNames]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

.filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

Combine .map().filter() (or similar chains) into a single pass with .reduce() or a for...of loop to avoid iterating the array twice

Rule: js-combine-iterations

Disable js-combine-iterations for this line
Suggested change
[...workspace.scriptDependencyNames]
// react-doctor-disable-next-line js-combine-iterations
[...workspace.scriptDependencyNames]
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/codebase/dependencies.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/codebase/dependencies.ts:222">
Severity: Warning

.filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

Combine `.map().filter()` (or similar chains) into a single pass with `.reduce()` or a `for...of` loop to avoid iterating the array twice

Rule: `js-combine-iterations`
</violation>

</file>

Reviewed by react-review for commit 3b098da. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3b098da. Configure here.

Comment thread packages/react-doctor-v2/src/core/inspect-react-project.ts
Comment thread packages/react-doctor-v2/src/cli/index.ts
- Recategorize Tailwind-specific rules (size/padding shorthand, space-on-flex, default palette) from design-* to tailwind-* so they're ecosystem rules, not core React rules
- Tighten js-length-check-first to require actual element-wise comparison and handle IfStatement/ConditionalExpression guards with branch-awareness
- Broaden async-parallel test file skip pattern to cover __tests__/ dirs, e2e/integration files, mocks, and fixtures
- Make preventDefault form message framework-agnostic (remove server action suggestion)
- Add web-only workspace directory detection for RN rules (apps/web/, packages/web-app/, etc.)
- Add 20 tests covering all changes
@@ -0,0 +1,27 @@
import type { EsTreeNode } from "../../utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import type { EsTreeNode } from "../../utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import type { EsTreeNode } from "../../utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/utils/mirror-binding.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/utils/mirror-binding.ts:1">
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>

Reviewed by react-review for commit 751bbd2. Configure here.

@@ -0,0 +1,48 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/tanstack-start/tanstack-start-get-mutation.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/tanstack-start/tanstack-start-get-mutation.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>

Reviewed by react-review for commit 751bbd2. Configure here.

@@ -0,0 +1,89 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-effect-chain.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-effect-chain.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>

Reviewed by react-review for commit 751bbd2. Configure here.

@@ -0,0 +1,81 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-direct-state-mutation.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-direct-state-mutation.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>

Reviewed by react-review for commit 751bbd2. Configure here.

@@ -0,0 +1,51 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-derived-usestate.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-derived-usestate.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>

Reviewed by react-review for commit 751bbd2. Configure here.

@@ -0,0 +1,38 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/tanstack-query/query-no-unstable-query-key.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/tanstack-query/query-no-unstable-query-key.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>

Reviewed by react-review for commit 751bbd2. Configure here.

@@ -0,0 +1,29 @@
import { defineRule } from "../../registry.js";
import { extractIndexName, isInsideStaticPlaceholderMap, isNodeOfType } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { extractIndexName, isInsideStaticPlaceholderMap, isNodeOfType } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { extractIndexName, isInsideStaticPlaceholderMap, isNodeOfType } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-array-index-as-key.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-array-index-as-key.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>

Reviewed by react-review for commit 751bbd2. Configure here.

@@ -0,0 +1,39 @@
import { defineRule } from "../../registry.js";
import { TANSTACK_QUERY_HOOKS, isNodeOfType } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { TANSTACK_QUERY_HOOKS, isNodeOfType } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { TANSTACK_QUERY_HOOKS, isNodeOfType } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/tanstack-query/query-no-unstable-deps.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/tanstack-query/query-no-unstable-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>

Reviewed by react-review for commit 751bbd2. Configure here.

@@ -0,0 +1,49 @@
import type { EsTreeNode } from "../../utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import type { EsTreeNode } from "../../utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import type { EsTreeNode } from "../../utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/utils/is-inside-static-placeholder-map.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/utils/is-inside-static-placeholder-map.ts:1">
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>

Reviewed by react-review for commit 751bbd2. Configure here.

@@ -0,0 +1,58 @@
import { defineRule } from "../../registry.js";
import { findJsxAttribute, isNodeOfType } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { findJsxAttribute, isNodeOfType } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { findJsxAttribute, isNodeOfType } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-aria-invalid-without-describedby.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-aria-invalid-without-describedby.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>

Reviewed by react-review for commit 751bbd2. Configure here.

Pre-build reverse import and re-export source indices so graph
reference propagation runs in O(importers) instead of O(N) per lookup.
Add early-return in propagateStarReExportReferences for nodes without
star re-exports. Fixes supabase/apps/studio (3559 files) completing
in ~59s instead of hanging indefinitely.

Co-authored-by: Cursor <cursoragent@cursor.com>
@@ -0,0 +1,47 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<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>

Reviewed by react-review for commit e28aea5. Configure here.

@@ -0,0 +1,38 @@
import { defineRule } from "../../registry.js";
import { isNodeOfType } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { isNodeOfType } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { isNodeOfType } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<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>

Reviewed by react-review for commit e28aea5. Configure here.

@@ -0,0 +1,47 @@
import { defineRule } from "../../registry.js";
import { isComponentAssignment, isComponentDeclaration } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { isComponentAssignment, isComponentDeclaration } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { isComponentAssignment, isComponentDeclaration } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<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>

Reviewed by react-review for commit e28aea5. Configure here.

@@ -0,0 +1,67 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<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>

Reviewed by react-review for commit e28aea5. Configure here.

@@ -0,0 +1,124 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<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>

</file>

Reviewed by react-review for commit e28aea5. Configure here.

@@ -0,0 +1,88 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/effect-no-reset-all-state-on-prop-change.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/effect-no-reset-all-state-on-prop-change.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>

Reviewed by react-review for commit e28aea5. Configure here.

@@ -0,0 +1,18 @@
import { defineRule } from "../../registry.js";
import { REACT_19_DEPRECATED_MESSAGES, createDeprecatedReactImportRule } from "./utils/index.js";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import { REACT_19_DEPRECATED_MESSAGES, createDeprecatedReactImportRule } from "./utils/index.js";
// react-doctor-disable-next-line no-barrel-import
import { REACT_19_DEPRECATED_MESSAGES, createDeprecatedReactImportRule } from "./utils/index.js";
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-react19-deprecated-apis.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-react19-deprecated-apis.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>

Reviewed by react-review for commit e28aea5. Configure here.

@@ -0,0 +1,67 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/effect-no-pass-live-state-to-parent.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/effect-no-pass-live-state-to-parent.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>

Reviewed by react-review for commit e28aea5. Configure here.

@@ -0,0 +1,27 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/no-react-dom-deprecated-apis.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/no-react-dom-deprecated-apis.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>

Reviewed by react-review for commit e28aea5. Configure here.

@@ -0,0 +1,97 @@
import { defineRule } from "../../registry.js";
import {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Disable no-barrel-import for this line
Suggested change
import {
// react-doctor-disable-next-line no-barrel-import
import {
Copy prompt for agent
Check if this React Review issue is valid. If so, understand the root cause and fix it.

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 issue instead of changing or suppressing the rule.

<file name="packages/react-doctor-v2/src/core/rules/lint/react/effect-no-pass-data-to-parent.ts">

<violation number="1" location="packages/react-doctor-v2/src/core/rules/lint/react/effect-no-pass-data-to-parent.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>

Reviewed by react-review for commit e28aea5. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants