Skip to content

React Review: errors & warnings on default branch #3

@reactreview

Description

@reactreview

Score: 85/100 · 0 errors · 73 warnings

Copy as prompt
Fix the following React Review diagnostics in my codebase.

## Warnings (73)

1. [warning] no-barrel-import — packages/agent-install/src/cli/commands/mcp/remove.ts:4
   Import from barrel/index file — import directly from the source module for better tree-shaking

2. [warning] js-combine-iterations — packages/agent-install/src/skill/agents.ts:454
   .filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

3. [warning] js-combine-iterations — packages/agent-install/src/skill/agents.ts:459
   .filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

4. [warning] js-combine-iterations — packages/agent-install/src/skill/agents.ts:470
   .filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

5. [warning] no-barrel-import — packages/agent-install/src/cli/commands/mcp/list.ts:4
   Import from barrel/index file — import directly from the source module for better tree-shaking

6. [warning] no-barrel-import — packages/agent-install/src/cli/commands/mcp/add.ts:4
   Import from barrel/index file — import directly from the source module for better tree-shaking

7. [warning] js-set-map-lookups — packages/agent-install/src/cli/commands/mcp/add.ts:36
   array.indexOf() in a loop is O(n) per call — convert to a Set for O(1) lookups

8. [warning] no-barrel-import — packages/agent-install/src/cli/commands/doc/symlink-claude.ts:2
   Import from barrel/index file — import directly from the source module for better tree-shaking

9. [warning] no-barrel-import — packages/agent-install/src/cli/commands/doc/set-section.ts:7
   Import from barrel/index file — import directly from the source module for better tree-shaking

10. [warning] no-barrel-import — packages/agent-install/src/cli/commands/doc/resolve-agent.ts:1
   Import from barrel/index file — import directly from the source module for better tree-shaking

11. [warning] no-barrel-import — packages/agent-install/src/cli/commands/doc/remove-section.ts:5
   Import from barrel/index file — import directly from the source module for better tree-shaking

12. [warning] no-barrel-import — packages/agent-install/src/cli/commands/doc/read.ts:5
   Import from barrel/index file — import directly from the source module for better tree-shaking

13. [warning] no-barrel-import — packages/agent-install/src/cli/commands/doc/init.ts:7
   Import from barrel/index file — import directly from the source module for better tree-shaking

14. [warning] no-barrel-import — packages/agent-install/src/mcp/remove.ts:5
   Import from barrel/index file — import directly from the source module for better tree-shaking

15. [warning] no-barrel-import — packages/agent-install/src/cli.ts:3
   Import from barrel/index file — import directly from the source module for better tree-shaking

16. [warning] js-tosorted-immutable — packages/agent-install/test/skill-agents.test.ts:76
   [...array].sort() — use array.toSorted() for immutable sorting (ES2023)

17. [warning] js-tosorted-immutable — packages/agent-install/test/skill-agents.test.ts:77
   [...array].sort() — use array.toSorted() for immutable sorting (ES2023)

18. [warning] no-barrel-import — packages/agent-install/src/mcp/list.ts:4
   Import from barrel/index file — import directly from the source module for better tree-shaking

19. [warning] no-barrel-import — packages/agent-install/src/mcp/installer.ts:3
   Import from barrel/index file — import directly from the source module for better tree-shaking

20. [warning] no-generic-handler-names — apps/website/components/copy-button.tsx:27
   Non-descriptive handler name "handleClick" — name should describe what it does, not when it runs

21. [warning] no-danger — apps/website/app/page.tsx:353
   Do not use `dangerouslySetInnerHTML` prop

22. [warning] no-danger — apps/website/app/page.tsx:391
   Do not use `dangerouslySetInnerHTML` prop

23. [warning] click-events-have-key-events — apps/website/app/page.tsx:133
   Enforce a clickable non-interactive element has at least one keyboard event listener.

24. [warning] click-events-have-key-events — apps/website/app/page.tsx:435
   Enforce a clickable non-interactive element has at least one keyboard event listener.

25. [warning] no-static-element-interactions — apps/website/app/page.tsx:133
   Static HTML elements with event handlers require a role.

26. [warning] no-static-element-interactions — apps/website/app/page.tsx:435
   Static HTML elements with event handlers require a role.

27. [warning] nextjs-missing-metadata — apps/website/app/page.tsx:1
   Page without metadata or generateMetadata export — hurts SEO

28. [warning] prefer-useReducer — apps/website/app/page.tsx:46
   Component "HomePage" has 6 useState calls — consider useReducer for related state

29. [warning] no-giant-component — apps/website/app/page.tsx:46
   Component "HomePage" is 442 lines — consider breaking it into smaller focused components

30. [warning] no-fetch-in-effect — apps/website/app/page.tsx:55
   fetch() inside useEffect — use a data fetching library (react-query, SWR) or server component

31. [warning] nextjs-no-client-fetch-for-server-data — apps/website/app/page.tsx:55
   useEffect + fetch in a page/layout — fetch data server-side with a server component instead

32. [warning] rendering-svg-precision — apps/website/app/page.tsx:121
   SVG d attribute uses 4+ decimal precision — truncate to 1–2 decimals to shrink markup with no visible difference

33. [warning] rendering-conditional-render — apps/website/app/page.tsx:277
   Conditional rendering with a numeric value can render '0' — use `value > 0`, `Boolean(value)`, or a ternary

34. [warning] no-array-index-as-key — apps/website/app/page.tsx:434
   Array index "index" used as key — causes bugs when list is reordered or filtered

35. [warning] async-await-in-loop — packages/agent-install/test/e2e/cli-dispatch.e2e.test.ts:52
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

36. [warning] no-barrel-import — packages/agent-install/test/mcp-formats-remove.test.ts:10
   Import from barrel/index file — import directly from the source module for better tree-shaking

37. [warning] async-await-in-loop — packages/agent-install/test/installer-symlink.test.ts:115
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

38. [warning] no-barrel-import — packages/agent-install/src/cli/utils/parse-skill-agent-list.ts:1
   Import from barrel/index file — import directly from the source module for better tree-shaking

39. [warning] js-combine-iterations — packages/agent-install/src/skill/skills.ts:106
   .filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

40. [warning] async-await-in-loop — packages/agent-install/src/skill/skills.ts:163
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

41. [warning] async-await-in-loop — packages/agent-install/src/skill/skills.ts:167
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

42. [warning] async-await-in-loop — packages/agent-install/src/skill/skills.ts:181
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

43. [warning] no-barrel-import — packages/agent-install/src/cli/utils/parse-mcp-agent-list.ts:1
   Import from barrel/index file — import directly from the source module for better tree-shaking

44. [warning] async-parallel — packages/agent-install/src/skill/installer.ts:73
   3 sequential await statements that appear independent — use Promise.all() for parallel execution

45. [warning] js-combine-iterations — packages/agent-install/src/skill/installer.ts:77
   .filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

46. [warning] async-await-in-loop — packages/agent-install/test/fetch-well-known.test.ts:37
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

47. [warning] async-await-in-loop — packages/agent-install/src/skill/install-skills-from-source.ts:92
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

48. [warning] async-await-in-loop — packages/agent-install/src/skill/install-skills-from-source.ts:92
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

49. [warning] no-barrel-import — packages/agent-install/src/cli/commands/skill/remove.ts:9
   Import from barrel/index file — import directly from the source module for better tree-shaking

50. [warning] async-await-in-loop — packages/agent-install/src/cli/commands/skill/remove.ts:59
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

51. [warning] async-await-in-loop — packages/agent-install/src/cli/commands/skill/remove.ts:64
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

52. [warning] no-dynamic-import-path — packages/agent-install/test/e2e/package-exports.e2e.test.ts:50
   Dynamic import path is not statically analyzable — use a string literal so the bundler can split this chunk

53. [warning] no-dynamic-import-path — packages/agent-install/test/e2e/package-exports.e2e.test.ts:60
   Dynamic import path is not statically analyzable — use a string literal so the bundler can split this chunk

54. [warning] no-dynamic-import-path — packages/agent-install/test/e2e/package-exports.e2e.test.ts:72
   Dynamic import path is not statically analyzable — use a string literal so the bundler can split this chunk

55. [warning] server-sequential-independent-await — packages/agent-install/test/e2e/package-exports.e2e.test.ts:84
   Sequential `await` without a data dependency on the previous result — wrap the independent calls in `Promise.all([...])` so they race instead of waterfalling

56. [warning] no-dynamic-import-path — packages/agent-install/test/e2e/package-exports.e2e.test.ts:83
   Dynamic import path is not statically analyzable — use a string literal so the bundler can split this chunk

57. [warning] no-dynamic-import-path — packages/agent-install/test/e2e/package-exports.e2e.test.ts:84
   Dynamic import path is not statically analyzable — use a string literal so the bundler can split this chunk

58. [warning] no-dynamic-import-path — packages/agent-install/test/e2e/package-exports.e2e.test.ts:94
   Dynamic import path is not statically analyzable — use a string literal so the bundler can split this chunk

59. [warning] no-dynamic-import-path — packages/agent-install/test/e2e/package-exports.e2e.test.ts:108
   Dynamic import path is not statically analyzable — use a string literal so the bundler can split this chunk

60. [warning] no-dynamic-import-path — packages/agent-install/test/e2e/package-exports.e2e.test.ts:114
   Dynamic import path is not statically analyzable — use a string literal so the bundler can split this chunk

61. [warning] no-dynamic-import-path — packages/agent-install/test/e2e/package-exports.e2e.test.ts:121
   Dynamic import path is not statically analyzable — use a string literal so the bundler can split this chunk

62. [warning] no-barrel-import — packages/agent-install/src/cli/commands/skill/list.ts:9
   Import from barrel/index file — import directly from the source module for better tree-shaking

63. [warning] async-await-in-loop — packages/agent-install/src/cli/commands/skill/list.ts:59
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

64. [warning] async-await-in-loop — packages/agent-install/src/cli/commands/skill/list.ts:104
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

65. [warning] async-await-in-loop — packages/agent-install/src/cli/commands/skill/list.ts:121
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

66. [warning] async-parallel — packages/agent-install/test/e2e/helpers.ts:115
   3 sequential await statements that appear independent — use Promise.all() for parallel execution

67. [warning] js-combine-iterations — packages/agent-install/test/e2e/cli-skill.e2e.test.ts:155
   .filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

68. [warning] js-combine-iterations — packages/agent-install/test/e2e/cli-skill.e2e.test.ts:185
   .filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

69. [warning] js-combine-iterations — packages/agent-install/test/e2e/cli-skill.e2e.test.ts:215
   .filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of

70. [warning] js-set-map-lookups — packages/agent-install/src/skill/fetch-well-known.ts:51
   array.includes() in a loop is O(n) per call — convert to a Set for O(1) lookups

71. [warning] async-await-in-loop — packages/agent-install/src/skill/fetch-well-known.ts:115
   await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use `await Promise.all(items.map(...))` to run them concurrently

72. [warning] async-parallel — packages/agent-install/src/skill/fetch-well-known.ts:160
   3 sequential await statements that appear independent — use Promise.all() for parallel execution

73. [warning] no-barrel-import — packages/agent-install/src/cli/commands/skill/add.ts:5
   Import from barrel/index file — import directly from the source module for better tree-shaking

⚠️ Warnings (73)

no-barrel-import

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

packages/agent-install/src/cli/commands/mcp/remove.ts:4
packages/agent-install/src/cli/commands/mcp/list.ts:4
packages/agent-install/src/cli/commands/mcp/add.ts:4
packages/agent-install/src/cli/commands/doc/symlink-claude.ts:2
packages/agent-install/src/cli/commands/doc/set-section.ts:7
packages/agent-install/src/cli/commands/doc/resolve-agent.ts:1
packages/agent-install/src/cli/commands/doc/remove-section.ts:5
packages/agent-install/src/cli/commands/doc/read.ts:5
packages/agent-install/src/cli/commands/doc/init.ts:7
packages/agent-install/src/mcp/remove.ts:5
packages/agent-install/src/cli.ts:3
packages/agent-install/src/mcp/list.ts:4
packages/agent-install/src/mcp/installer.ts:3
packages/agent-install/test/mcp-formats-remove.test.ts:10
packages/agent-install/src/cli/utils/parse-skill-agent-list.ts:1
packages/agent-install/src/cli/utils/parse-mcp-agent-list.ts:1
packages/agent-install/src/cli/commands/skill/remove.ts:9
packages/agent-install/src/cli/commands/skill/list.ts:9
packages/agent-install/src/cli/commands/skill/add.ts:5

async-await-in-loop

await inside a for…of loop runs the calls sequentially — for independent operations, collect them and use await Promise.all(items.map(...)) to run them concurrently

Collect the items and use await Promise.all(items.map(...)) to run independent operations concurrently

packages/agent-install/test/e2e/cli-dispatch.e2e.test.ts:52
packages/agent-install/test/installer-symlink.test.ts:115
packages/agent-install/src/skill/skills.ts:163
packages/agent-install/src/skill/skills.ts:167
packages/agent-install/src/skill/skills.ts:181
packages/agent-install/test/fetch-well-known.test.ts:37
packages/agent-install/src/skill/install-skills-from-source.ts:92
packages/agent-install/src/skill/install-skills-from-source.ts:92
packages/agent-install/src/cli/commands/skill/remove.ts:59
packages/agent-install/src/cli/commands/skill/remove.ts:64
packages/agent-install/src/cli/commands/skill/list.ts:59
packages/agent-install/src/cli/commands/skill/list.ts:104
packages/agent-install/src/cli/commands/skill/list.ts:121
packages/agent-install/src/skill/fetch-well-known.ts:115

no-dynamic-import-path

Dynamic import path is not statically analyzable — use a string literal so the bundler can split this chunk

Use a string-literal path: import('./feature/heavy.js') so the bundler can split this chunk

packages/agent-install/test/e2e/package-exports.e2e.test.ts:50
packages/agent-install/test/e2e/package-exports.e2e.test.ts:60
packages/agent-install/test/e2e/package-exports.e2e.test.ts:72
packages/agent-install/test/e2e/package-exports.e2e.test.ts:83
packages/agent-install/test/e2e/package-exports.e2e.test.ts:84
packages/agent-install/test/e2e/package-exports.e2e.test.ts:94
packages/agent-install/test/e2e/package-exports.e2e.test.ts:108
packages/agent-install/test/e2e/package-exports.e2e.test.ts:114
packages/agent-install/test/e2e/package-exports.e2e.test.ts:121

js-combine-iterations

.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

packages/agent-install/src/skill/agents.ts:454
packages/agent-install/src/skill/agents.ts:459
packages/agent-install/src/skill/agents.ts:470
packages/agent-install/src/skill/skills.ts:106
packages/agent-install/src/skill/installer.ts:77
packages/agent-install/test/e2e/cli-skill.e2e.test.ts:155
packages/agent-install/test/e2e/cli-skill.e2e.test.ts:185
packages/agent-install/test/e2e/cli-skill.e2e.test.ts:215

async-parallel

3 sequential await statements that appear independent — use Promise.all() for parallel execution

Use const [a, b] = await Promise.all([fetchA(), fetchB()]) to run independent operations concurrently

packages/agent-install/src/skill/installer.ts:73
packages/agent-install/test/e2e/helpers.ts:115
packages/agent-install/src/skill/fetch-well-known.ts:160

js-set-map-lookups

array.indexOf() 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

packages/agent-install/src/cli/commands/mcp/add.ts:36
packages/agent-install/src/skill/fetch-well-known.ts:51

js-tosorted-immutable

[...array].sort() — use array.toSorted() for immutable sorting (ES2023)

Use array.toSorted() (ES2023) instead of [...array].sort() for immutable sorting without the spread allocation

packages/agent-install/test/skill-agents.test.ts:76
packages/agent-install/test/skill-agents.test.ts:77

no-danger

Do not use dangerouslySetInnerHTML prop

dangerouslySetInnerHTML is a way to inject HTML into your React component. This is dangerous because it can easily lead to XSS vulnerabilities.

apps/website/app/page.tsx:353
apps/website/app/page.tsx:391

click-events-have-key-events

Enforce a clickable non-interactive element has at least one keyboard event listener.

Visible, non-interactive elements with click handlers must have one of keyup, keydown, or keypress listener.

apps/website/app/page.tsx:133
apps/website/app/page.tsx:435

no-static-element-interactions

Static HTML elements with event handlers require a role.

Add a role attribute to this element, or use a semantic HTML element instead.

apps/website/app/page.tsx:133
apps/website/app/page.tsx:435

no-generic-handler-names

Non-descriptive handler name "handleClick" — name should describe what it does, not when it runs

Rename to describe the action: e.g. handleSubmitsaveUserProfile, handleClicktoggleSidebar

apps/website/components/copy-button.tsx:27

nextjs-missing-metadata

Page without metadata or generateMetadata export — hurts SEO

Add export const metadata = { title: '...', description: '...' } or export async function generateMetadata()

apps/website/app/page.tsx:1

prefer-useReducer

Component "HomePage" has 6 useState calls — consider useReducer for related state

Group related state: const [state, dispatch] = useReducer(reducer, { field1, field2, ... })

apps/website/app/page.tsx:46

no-giant-component

Component "HomePage" is 442 lines — consider breaking it into smaller focused components

Extract logical sections into focused components: <UserHeader />, <UserActions />, etc.

apps/website/app/page.tsx:46

no-fetch-in-effect

fetch() inside useEffect — use a data fetching library (react-query, SWR) or server component

Use useQuery() from @tanstack/react-query, useSWR(), or fetch in a Server Component instead

apps/website/app/page.tsx:55

nextjs-no-client-fetch-for-server-data

useEffect + fetch in a page/layout — fetch data server-side with a server component instead

Remove 'use client' and fetch directly in the Server Component — no API round-trip, secrets stay on server

apps/website/app/page.tsx:55

rendering-svg-precision

SVG d attribute uses 4+ decimal precision — truncate to 1–2 decimals to shrink markup with no visible difference

Truncate path/points/transform decimals to 1–2 digits — sub-pixel precision adds bytes with no visible difference

apps/website/app/page.tsx:121

rendering-conditional-render

Conditional rendering with a numeric value can render '0' — use value > 0, Boolean(value), or a ternary

Change to {items.length > 0 && <List />} or use a ternary: {items.length ? <List /> : null}

apps/website/app/page.tsx:277

no-array-index-as-key

Array index "index" used as key — causes bugs when list is reordered or filtered

Use a stable unique identifier: key={item.id} or key={item.slug} — index keys break on reorder/filter

apps/website/app/page.tsx:434

server-sequential-independent-await

Sequential await without a data dependency on the previous result — wrap the independent calls in Promise.all([...]) so they race instead of waterfalling

Wrap independent awaits in Promise.all([...]) so they race instead of waterfalling — second call doesn't depend on the first

packages/agent-install/test/e2e/package-exports.e2e.test.ts:84


Last scored 2026-05-13T06:41:45.773Z. Maintained by React Review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions