Fix the following React Review diagnostics in my codebase.
## Errors (27)
1. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:421
React Hook "useContext" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
2. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:422
React Hook "useState" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
3. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:423
React Hook "useReducer" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
4. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:424
React Hook "useRef" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
5. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:425
React Hook "useCacheRefresh" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
6. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:426
React Hook "useLayoutEffect" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
7. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:427
React Hook "useInsertionEffect" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
8. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:428
React Hook "useEffect" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
9. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:429
React Hook "useImperativeHandle" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
10. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:430
React Hook "useDebugValue" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
11. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:431
React Hook "useCallback" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
12. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:432
React Hook "useTransition" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
13. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:433
React Hook "useSyncExternalStore" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
14. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:438
React Hook "useDeferredValue" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
15. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:439
React Hook "useMemo" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
16. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:440
React Hook "useOptimistic" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
17. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:441
React Hook "useFormState" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
18. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:442
React Hook "useActionState" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
19. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:443
React Hook "useHostTransitionStatus" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
20. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:444
React Hook "useMemoCache" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
21. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:446
React Hook "use" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
22. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:447
React Hook "use" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
23. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:449
React Hook "use" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
24. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:454
React Hook "useId" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
25. [error] rules-of-hooks — packages/bippy/src/source/inspect-hooks.ts:455
React Hook "useEffectEvent" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".
26. [error] no-eval — packages/vite-playground/src/source-editor.tsx:60
new Function() is a code injection risk — avoid dynamic code execution
27. [error] require-reduced-motion — packages/website/package.json:0
Project uses a motion library but has no prefers-reduced-motion handling — required for accessibility (WCAG 2.3.3)
## Warnings (49)
28. [warning] rendering-hydration-no-flicker — packages/bippy/src/test/did-fiber-commit.test.tsx:15
useEffect(setState, []) on mount causes a flash — consider useSyncExternalStore or suppressHydrationWarning
29. [warning] no-usememo-simple-expression — packages/bippy/src/source/inspect-hooks.ts:439
useMemo wrapping a trivially cheap expression — memo overhead exceeds the computation
30. [warning] rendering-hydration-no-flicker — packages/bippy/src/test/get-fiber-stack.test.tsx:27
useEffect(setState, []) on mount causes a flash — consider useSyncExternalStore or suppressHydrationWarning
31. [warning] rendering-hydration-no-flicker — packages/bippy/src/test/get-mutated-host-fibers.test.tsx:11
useEffect(setState, []) on mount causes a flash — consider useSyncExternalStore or suppressHydrationWarning
32. [warning] rendering-hydration-no-flicker — packages/bippy/src/test/get-nearest-host-fiber.test.tsx:27
useEffect(setState, []) on mount causes a flash — consider useSyncExternalStore or suppressHydrationWarning
33. [warning] js-set-map-lookups — packages/bippy/src/source/owner-stack.ts:203
array.includes() in a loop is O(n) per call — convert to a Set for O(1) lookups
34. [warning] js-set-map-lookups — packages/bippy/src/source/owner-stack.ts:209
array.includes() in a loop is O(n) per call — convert to a Set for O(1) lookups
35. [warning] js-set-map-lookups — packages/bippy/src/source/owner-stack.ts:256
array.includes() in a loop is O(n) per call — convert to a Set for O(1) lookups
36. [warning] no-usememo-simple-expression — packages/bippy/src/test/inspect-hooks.test.tsx:37
useMemo wrapping a trivially cheap expression — memo overhead exceeds the computation
37. [warning] js-combine-iterations — packages/bippy/src/test/inspect-hooks.test.tsx:245
.filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of
38. [warning] no-barrel-import — packages/bippy/src/test/source.test.tsx:8
Import from barrel/index file — import directly from source modules: "../source/get-source", "../source/owner-stack"
39. [warning] rendering-hydration-no-flicker — packages/bippy/src/test/did-fiber-render.test.tsx:15
useEffect(setState, []) on mount causes a flash — consider useSyncExternalStore or suppressHydrationWarning
40. [warning] rendering-hydration-no-flicker — packages/bippy/src/test/traverse.test.tsx:35
useEffect(setState, []) on mount causes a flash — consider useSyncExternalStore or suppressHydrationWarning
41. [warning] rerender-functional-setstate — packages/bippy/src/test/traverse.test.tsx:36
setCountState(countState + ...) — use functional update to avoid stale closures
42. [warning] no-react19-deprecated-apis — packages/e2e/fixtures/expo-app/src/App.tsx:30
forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly
43. [warning] no-react19-deprecated-apis — packages/e2e/fixtures/expo-app/src/App.tsx:33
useContext is superseded by `use()` on React 19+ — `use()` reads context conditionally inside hooks, branches, and loops; switch to `import { use } from 'react'`
44. [warning] js-flatmap-filter — packages/e2e/fixtures/expo-app/src/App.tsx:243
.map().filter(Boolean) iterates twice — use .flatMap() to transform and filter in a single pass
45. [warning] no-react19-deprecated-apis — packages/e2e/fixtures/next-app/app/test-harness.tsx:10
forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly
46. [warning] no-react19-deprecated-apis — packages/e2e/fixtures/next-app/app/test-harness.tsx:12
useContext is superseded by `use()` on React 19+ — `use()` reads context conditionally inside hooks, branches, and loops; switch to `import { use } from 'react'`
47. [warning] nextjs-missing-metadata — packages/e2e/fixtures/next-app/app/page.tsx:1
Page without metadata or generateMetadata export — hurts SEO
48. [warning] no-react19-deprecated-apis — packages/e2e/fixtures/vite-app/src/test-app.tsx:6
forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly
49. [warning] no-react19-deprecated-apis — packages/e2e/fixtures/vite-app/src/test-app.tsx:8
useContext is superseded by `use()` on React 19+ — `use()` reads context conditionally inside hooks, branches, and loops; switch to `import { use } from 'react'`
50. [warning] nextjs-missing-metadata — packages/next-playground/app/page.tsx:1
Page without metadata or generateMetadata export — hurts SEO
51. [warning] no-react19-deprecated-apis — packages/vite-playground/src/source-editor.tsx:27
useContext is superseded by `use()` on React 19+ — `use()` reads context conditionally inside hooks, branches, and loops; switch to `import { use } from 'react'`
52. [warning] no-react19-deprecated-apis — packages/vite-playground/src/source-editor.tsx:37
forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly
53. [warning] advanced-event-handler-refs — packages/vite-playground/src/source-editor.tsx:126
useEffect re-subscribes a "handleMouseMove" listener every time the handler identity changes — store the handler in a ref and have the listener read `handlerRef.current()`, then drop it from the deps
54. [warning] rerender-functional-setstate — packages/vite-playground/src/source-editor.tsx:156
setEditorState({ ...editorState, ... }) — use functional update `setEditorState(prev => ({ ...prev, ... }))` to avoid stale closures
55. [warning] no-inline-exhaustive-style — packages/vite-playground/src/source-editor.tsx:196
8 inline style properties — extract to a CSS class, CSS module, or styled component for maintainability and reuse
56. [warning] no-inline-exhaustive-style — packages/vite-playground/src/source-editor.tsx:212
9 inline style properties — extract to a CSS class, CSS module, or styled component for maintainability and reuse
57. [warning] no-z-index-9999 — packages/vite-playground/src/source-editor.tsx:221
z-index: 99998 is arbitrarily high — use a deliberate z-index scale (1–50). Extreme values signal a stacking context problem, not a fix
58. [warning] no-inline-exhaustive-style — packages/vite-playground/src/source-editor.tsx:229
13 inline style properties — extract to a CSS class, CSS module, or styled component for maintainability and reuse
59. [warning] no-z-index-9999 — packages/vite-playground/src/source-editor.tsx:240
z-index: 99999 is arbitrarily high — use a deliberate z-index scale (1–50). Extreme values signal a stacking context problem, not a fix
60. [warning] rerender-functional-setstate — packages/vite-playground/src/source-editor.tsx:280
setEditorState({ ...editorState, ... }) — use functional update `setEditorState(prev => ({ ...prev, ... }))` to avoid stale closures
61. [warning] no-inline-exhaustive-style — packages/vite-playground/src/source-editor.tsx:284
13 inline style properties — extract to a CSS class, CSS module, or styled component for maintainability and reuse
62. [warning] no-outline-none — packages/vite-playground/src/source-editor.tsx:293
outline: none removes keyboard focus visibility — use :focus-visible styling instead, or provide a box-shadow focus ring
63. [warning] no-inline-exhaustive-style — packages/vite-playground/src/source-editor.tsx:303
9 inline style properties — extract to a CSS class, CSS module, or styled component for maintainability and reuse
64. [warning] no-inline-exhaustive-style — packages/vite-playground/src/source-editor.tsx:345
8 inline style properties — extract to a CSS class, CSS module, or styled component for maintainability and reuse
65. [warning] no-fetch-in-effect — packages/website/components/action-buttons.tsx:14
fetch() inside useEffect — use a data fetching library (react-query, SWR) or server component
66. [warning] no-danger — packages/website/src/app.tsx:35
Do not use `dangerouslySetInnerHTML` prop
67. [warning] no-react19-deprecated-apis — packages/website/providers/site-provider.tsx:1
useContext is superseded by `use()` on React 19+ — `use()` reads context conditionally inside hooks, branches, and loops; switch to `import { use } from 'react'`
68. [warning] use-lazy-motion — packages/website/components/ui/dropdown-menu.tsx:3
Import "m" with LazyMotion instead of "motion" — saves ~30kb in bundle size
69. [warning] no-derived-useState — packages/website/components/ui/dropdown-menu.tsx:27
useState initialized from prop "defaultOpen" — if this value should stay in sync with the prop, derive it during render instead
70. [warning] no-react19-deprecated-apis — packages/website/components/ui/dropdown-menu.tsx:73
useContext is superseded by `use()` on React 19+ — `use()` reads context conditionally inside hooks, branches, and loops; switch to `import { use } from 'react'`
71. [warning] rerender-state-only-in-handlers — packages/website/components/copy-button.tsx:9
useState "copied" is updated but never read in the component's return — use useRef so updates don't trigger re-renders
72. [warning] use-lazy-motion — packages/website/components/ui/shimmer-text.tsx:1
Import "m" with LazyMotion instead of "motion" — saves ~30kb in bundle size
73. [warning] use-lazy-motion — packages/website/hooks/use-sliding-highlight.tsx:2
Import "m" with LazyMotion instead of "motion" — saves ~30kb in bundle size
74. [warning] no-react19-deprecated-apis — packages/website/hooks/use-sliding-highlight.tsx:97
useContext is superseded by `use()` on React 19+ — `use()` reads context conditionally inside hooks, branches, and loops; switch to `import { use } from 'react'`
75. [warning] no-react19-deprecated-apis — packages/website/components/ui/spinner.tsx:23
forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly
76. [warning] no-react19-deprecated-apis — packages/website/components/ui/spinner.tsx:62
forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly
Copy as prompt
❌ Errors (27)
React Hook "useContext" is called in function "Anonymous" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use". · 25 in 1 file
rules-of-hookspackages/bippy/src/source/inspect-hooks.tsnew Function() is a code injection risk — avoid dynamic code execution · 1 in 1 file
no-evalpackages/vite-playground/src/source-editor.tsxProject uses a motion library but has no prefers-reduced-motion handling — required for accessibility (WCAG 2.3.3) · 1 in 1 file
require-reduced-motionpackages/website/package.jsonforwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly · 13 in 8 files
no-react19-deprecated-apispackages/e2e/fixtures/expo-app/src/App.tsxpackages/e2e/fixtures/next-app/app/test-harness.tsxpackages/e2e/fixtures/vite-app/src/test-app.tsxpackages/vite-playground/src/source-editor.tsxpackages/website/components/ui/spinner.tsxuseEffect(setState, []) on mount causes a flash — consider useSyncExternalStore or suppressHydrationWarning · 6 in 6 files
rendering-hydration-no-flickerpackages/bippy/src/test/did-fiber-commit.test.tsxpackages/bippy/src/test/get-fiber-stack.test.tsxpackages/bippy/src/test/get-mutated-host-fibers.test.tsxpackages/bippy/src/test/get-nearest-host-fiber.test.tsxpackages/bippy/src/test/did-fiber-render.test.tsx8 inline style properties — extract to a CSS class, CSS module, or styled component for maintainability and reuse · 6 in 1 file
no-inline-exhaustive-stylepackages/vite-playground/src/source-editor.tsxarray.includes() in a loop is O(n) per call — convert to a Set for O(1) lookups · 3 in 1 file
js-set-map-lookupspackages/bippy/src/source/owner-stack.tssetCountState(countState + ...) — use functional update to avoid stale closures · 3 in 2 files
rerender-functional-setstatepackages/vite-playground/src/source-editor.tsxpackages/bippy/src/test/traverse.test.tsxImport "m" with LazyMotion instead of "motion" — saves ~30kb in bundle size · 3 in 3 files
use-lazy-motionpackages/website/components/ui/dropdown-menu.tsxpackages/website/components/ui/shimmer-text.tsxpackages/website/hooks/use-sliding-highlight.tsxuseMemo wrapping a trivially cheap expression — memo overhead exceeds the computation · 2 in 2 files
no-usememo-simple-expressionpackages/bippy/src/source/inspect-hooks.tspackages/bippy/src/test/inspect-hooks.test.tsxPage without metadata or generateMetadata export — hurts SEO · 2 in 2 files
nextjs-missing-metadatapackages/e2e/fixtures/next-app/app/page.tsxpackages/next-playground/app/page.tsxz-index: 99998 is arbitrarily high — use a deliberate z-index scale (1–50). Extreme values signal a stacking context problem, not a fix · 2 in 1 file
no-z-index-9999packages/vite-playground/src/source-editor.tsx.filter().map() iterates the array twice — combine into a single loop with .reduce() or for...of · 1 in 1 file
js-combine-iterationspackages/bippy/src/test/inspect-hooks.test.tsxImport from barrel/index file — import directly from source modules: "../source/get-source", "../source/owner-stack" · 1 in 1 file
no-barrel-importpackages/bippy/src/test/source.test.tsx.map().filter(Boolean) iterates twice — use .flatMap() to transform and filter in a single pass · 1 in 1 file
js-flatmap-filterpackages/e2e/fixtures/expo-app/src/App.tsxuseEffect re-subscribes a "handleMouseMove" listener every time the handler identity changes — store the handler in a ref and have the listener read `handlerRef.current()`, then drop it from the deps · 1 in 1 file
advanced-event-handler-refspackages/vite-playground/src/source-editor.tsxoutline: none removes keyboard focus visibility — use :focus-visible styling instead, or provide a box-shadow focus ring · 1 in 1 file
no-outline-nonepackages/vite-playground/src/source-editor.tsxfetch() inside useEffect — use a data fetching library (react-query, SWR) or server component · 1 in 1 file
no-fetch-in-effectpackages/website/components/action-buttons.tsxDo not use `dangerouslySetInnerHTML` prop · 1 in 1 file
no-dangerpackages/website/src/app.tsxuseState initialized from prop "defaultOpen" — if this value should stay in sync with the prop, derive it during render instead · 1 in 1 file
no-derived-useStatepackages/website/components/ui/dropdown-menu.tsxuseState "copied" is updated but never read in the component's return — use useRef so updates don't trigger re-renders · 1 in 1 file
rerender-state-only-in-handlerspackages/website/components/copy-button.tsxReviewed by reactreview for commit 20a9177. Configure here.