Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

React Review Audit

Đang mở
#4 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
32/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
nextjs, react, tailwindcss, typescript

Hướng nghiên cứu

Bắt đầu với các vị trí được liên kết trong service/user.ts và service/file.ts cho bốn lỗi xác thực của server action, sau đó kiểm tra components/image-grid, components/upload và các tệp components/ui được liệt kê để xử lý các chẩn đoán còn lại. Chạy lại audit React Review sau khi xử lý bảy lỗi và 53 cảnh báo để tất cả các chẩn đoán được liệt kê đều được giải quyết.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Score: 92/100 · 7 errors · 53 warnings

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

## Errors (7)

1. [error] server-auth-actions — service/user.ts:6
   Server action "upsertUser" — add auth check (auth(), getSession(), etc.) at the top

2. [error] server-auth-actions — service/user.ts:18
   Server action "getDBUser" — add auth check (auth(), getSession(), etc.) at the top

3. [error] server-auth-actions — service/file.ts:9
   Server action "createFile" — add auth check (auth(), getSession(), etc.) at the top

4. [error] server-auth-actions — service/file.ts:37
   Server action "getFiles" — add auth check (auth(), getSession(), etc.) at the top

5. [error] rules-of-hooks — components/image-grid/index.tsx:27
   React Hook "useQuery" is called conditionally. React Hooks must be called in the exact same order in every component render.

6. [error] rules-of-hooks — components/upload.tsx:14
   React Hook "useToast" is called conditionally. React Hooks must be called in the exact same order in every component render.

7. [error] rules-of-hooks — components/upload.tsx:15
   React Hook "useQueryClient" is called conditionally. React Hooks must be called in the exact same order in every component render.

## Warnings (53)

8. [warning] no-react19-deprecated-apis — components/ui/context-menu.tsx:21
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

9. [warning] design-no-redundant-size-axes — components/ui/context-menu.tsx:37
   w-4 h-4 → use the shorthand size-4 (Tailwind v3.4+)

10. [warning] no-react19-deprecated-apis — components/ui/context-menu.tsx:42
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

11. [warning] no-react19-deprecated-apis — components/ui/context-menu.tsx:57
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

12. [warning] no-react19-deprecated-apis — components/ui/context-menu.tsx:74
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

13. [warning] no-react19-deprecated-apis — components/ui/context-menu.tsx:92
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

14. [warning] design-no-redundant-size-axes — components/ui/context-menu.tsx:105
   w-3.5 h-3.5 → use the shorthand size-3.5 (Tailwind v3.4+)

15. [warning] design-no-redundant-size-axes — components/ui/context-menu.tsx:107
   w-4 h-4 → use the shorthand size-4 (Tailwind v3.4+)

16. [warning] no-react19-deprecated-apis — components/ui/context-menu.tsx:116
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

17. [warning] design-no-redundant-size-axes — components/ui/context-menu.tsx:128
   w-3.5 h-3.5 → use the shorthand size-3.5 (Tailwind v3.4+)

18. [warning] design-no-redundant-size-axes — components/ui/context-menu.tsx:130
   w-4 h-4 → use the shorthand size-4 (Tailwind v3.4+)

19. [warning] no-react19-deprecated-apis — components/ui/context-menu.tsx:138
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

20. [warning] no-react19-deprecated-apis — components/ui/context-menu.tsx:156
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

21. [warning] no-react19-deprecated-apis — components/ui/card.tsx:5
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

22. [warning] no-react19-deprecated-apis — components/ui/card.tsx:20
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

23. [warning] no-react19-deprecated-apis — components/ui/card.tsx:32
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

24. [warning] no-react19-deprecated-apis — components/ui/card.tsx:44
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

25. [warning] no-react19-deprecated-apis — components/ui/card.tsx:56
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

26. [warning] no-react19-deprecated-apis — components/ui/card.tsx:64
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

27. [warning] no-react19-deprecated-apis — components/ui/button.tsx:43
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

28. [warning] server-after-nonblocking — service/file.ts:32
   console.log() in server action — wrap in `after(() => console.log(...))` so it doesn't delay the user-visible response

29. [warning] design-no-redundant-size-axes — components/mode-toggle.tsx:32
   w-4 h-4 → use the shorthand size-4 (Tailwind v3.4+)

30. [warning] design-no-redundant-size-axes — components/mode-toggle.tsx:43
   w-4 h-4 → use the shorthand size-4 (Tailwind v3.4+)

31. [warning] no-unknown-property — components/image-grid/index.tsx:88
   Unknown property found

32. [warning] design-no-three-period-ellipsis — components/image-grid/index.tsx:43
   Three-period ellipsis ("...") in JSX text — use the actual ellipsis character "…" (or `…`)

33. [warning] nextjs-no-img-element — components/image-grid/index.tsx:81
   Use next/image instead of <img> — provides automatic optimization, lazy loading, and responsive srcset

34. [warning] async-await-in-loop — components/upload.tsx:21
   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

35. [warning] no-react19-deprecated-apis — components/ui/toast.tsx:12
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

36. [warning] no-react19-deprecated-apis — components/ui/toast.tsx:43
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

37. [warning] no-react19-deprecated-apis — components/ui/toast.tsx:58
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

38. [warning] no-react19-deprecated-apis — components/ui/toast.tsx:73
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

39. [warning] design-no-redundant-size-axes — components/ui/toast.tsx:86
   w-4 h-4 → use the shorthand size-4 (Tailwind v3.4+)

40. [warning] no-react19-deprecated-apis — components/ui/toast.tsx:91
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

41. [warning] no-react19-deprecated-apis — components/ui/toast.tsx:103
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

42. [warning] no-unknown-property — components/image-grid/image-dialog.tsx:118
   Unknown property found

43. [warning] nextjs-no-img-element — components/image-grid/image-dialog.tsx:111
   Use next/image instead of <img> — provides automatic optimization, lazy loading, and responsive srcset

44. [warning] no-react19-deprecated-apis — components/ui/select.tsx:15
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

45. [warning] design-no-redundant-size-axes — components/ui/select.tsx:29
   w-4 h-4 → use the shorthand size-4 (Tailwind v3.4+)

46. [warning] no-react19-deprecated-apis — components/ui/select.tsx:35
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

47. [warning] design-no-redundant-size-axes — components/ui/select.tsx:47
   w-4 h-4 → use the shorthand size-4 (Tailwind v3.4+)

48. [warning] no-react19-deprecated-apis — components/ui/select.tsx:52
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

49. [warning] design-no-redundant-size-axes — components/ui/select.tsx:64
   w-4 h-4 → use the shorthand size-4 (Tailwind v3.4+)

50. [warning] no-react19-deprecated-apis — components/ui/select.tsx:70
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

51. [warning] no-react19-deprecated-apis — components/ui/select.tsx:102
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

52. [warning] no-react19-deprecated-apis — components/ui/select.tsx:114
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

53. [warning] design-no-redundant-size-axes — components/ui/select.tsx:126
   w-3.5 h-3.5 → use the shorthand size-3.5 (Tailwind v3.4+)

54. [warning] design-no-redundant-size-axes — components/ui/select.tsx:128
   w-4 h-4 → use the shorthand size-4 (Tailwind v3.4+)

55. [warning] no-react19-deprecated-apis — components/ui/select.tsx:136
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

56. [warning] no-react19-deprecated-apis — components/ui/dialog.tsx:17
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

57. [warning] no-react19-deprecated-apis — components/ui/dialog.tsx:32
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

58. [warning] design-no-redundant-size-axes — components/ui/dialog.tsx:48
   w-4 h-4 → use the shorthand size-4 (Tailwind v3.4+)

59. [warning] no-react19-deprecated-apis — components/ui/dialog.tsx:84
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

60. [warning] no-react19-deprecated-apis — components/ui/dialog.tsx:99
   forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

❌ Errors (7)

server-auth-actions

Server action "upsertUser" — add auth check (auth(), getSession(), etc.) at the top

Add const session = await auth() at the top and throw/redirect if unauthorized before any data access

service/user.ts:6
service/user.ts:18
service/file.ts:9
service/file.ts:37

rules-of-hooks

React Hook "useQuery" is called conditionally. React Hooks must be called in the exact same order in every component render.

Move the Hook call before the condition, or call it unconditionally and branch inside the Hook/effect instead.

components/image-grid/index.tsx:27
components/upload.tsx:14
components/upload.tsx:15


⚠️ Warnings (53)

no-react19-deprecated-apis

forwardRef is no longer needed on React 19+ — refs are regular props on function components; remove forwardRef and pass ref directly

Pass ref as a regular prop on function components — forwardRef is no longer needed in React 19+. Replace useContext(X) with use(X) for branch-aware context reads. Only enabled on projects detected as React 19+.

components/ui/context-menu.tsx:21
components/ui/context-menu.tsx:42
components/ui/context-menu.tsx:57
components/ui/context-menu.tsx:74
components/ui/context-menu.tsx:92
components/ui/context-menu.tsx:116
components/ui/context-menu.tsx:138
components/ui/context-menu.tsx:156
components/ui/card.tsx:5
components/ui/card.tsx:20
components/ui/card.tsx:32
components/ui/card.tsx:44
components/ui/card.tsx:56
components/ui/card.tsx:64
components/ui/button.tsx:43
components/ui/toast.tsx:12
components/ui/toast.tsx:43
components/ui/toast.tsx:58
components/ui/toast.tsx:73
components/ui/toast.tsx:91
components/ui/toast.tsx:103
components/ui/select.tsx:15
components/ui/select.tsx:35
components/ui/select.tsx:52
components/ui/select.tsx:70
components/ui/select.tsx:102
components/ui/select.tsx:114
components/ui/select.tsx:136
components/ui/dialog.tsx:17
components/ui/dialog.tsx:32
components/ui/dialog.tsx:84
components/ui/dialog.tsx:99

design-no-redundant-size-axes

w-4 h-4 → use the shorthand size-4 (Tailwind v3.4+)

Collapse w-N h-N to size-N (Tailwind v3.4+) when both axes match

components/ui/context-menu.tsx:37
components/ui/context-menu.tsx:105
components/ui/context-menu.tsx:107
components/ui/context-menu.tsx:128
components/ui/context-menu.tsx:130
components/mode-toggle.tsx:32
components/mode-toggle.tsx:43
components/ui/toast.tsx:86
components/ui/select.tsx:29
components/ui/select.tsx:47
components/ui/select.tsx:64
components/ui/select.tsx:126
components/ui/select.tsx:128
components/ui/dialog.tsx:48

no-unknown-property

Unknown property found

Remove unknown property

components/image-grid/index.tsx:88
components/image-grid/image-dialog.tsx:118

nextjs-no-img-element

Use next/image instead of <img> — provides automatic optimization, lazy loading, and responsive srcset

import Image from 'next/image' — provides automatic WebP/AVIF, lazy loading, and responsive srcset

components/image-grid/index.tsx:81
components/image-grid/image-dialog.tsx:111

server-after-nonblocking

console.log() in server action — wrap in after(() =&gt; console.log(...)) so it doesn't delay the user-visible response

import { after } from 'next/server' then wrap: after(() =&gt; analytics.track(...)) — response isn't blocked

service/file.ts:32

design-no-three-period-ellipsis

Three-period ellipsis ("...") in JSX text — use the actual ellipsis character "…" (or &hellip;)

Use the typographic ellipsis "…" (or &hellip;) instead of three periods — pairs with action-with-followup labels ("Rename…", "Loading…")

components/image-grid/index.tsx:43

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

components/upload.tsx:21


Last scored May 14, 2026 at 9:39 AM UTC. Maintained by React Review.

Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của celeroncoder/drop

Tất cả issue của celeroncoder/drop

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.