fix#210
Conversation
|
🔴 React Review — 0/100 (unchanged) · Copy prompt for agentReviewed by react-review for commit e28aea5. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| @@ -0,0 +1,68 @@ | |||
| import { defineRule } from "../../registry.js"; | |||
| import { | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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|:)`); |
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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 |
There was a problem hiding this comment.
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
| ...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] |
There was a problem hiding this comment.
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
| [...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 |
There was a problem hiding this comment.
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
| 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] |
There was a problem hiding this comment.
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
| [...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] |
There was a problem hiding this comment.
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
| [...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.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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.
- 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"; | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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"; | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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 { | |||
There was a problem hiding this comment.
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
| 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.

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 751bbd2. Bugbot is set up for automated code reviews on this repo. Configure here.