improvement(lint): fix react-doctor errors and warnings#3232
improvement(lint): fix react-doctor errors and warnings#3232waleedlatif1 merged 2 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
337f0c9 to
28046e8
Compare
|
@cursor review |
|
@greptile |
Greptile SummaryThis PR addresses a broad set of lint and react-doctor warnings across 22 files. The majority of changes are straightforward correctness improvements: replacing named lodash imports with subpath imports ( The one area that conflicts with project conventions is the extraction of component-specific styles into
All other changes in the PR are clean and well-scoped. Confidence Score: 3/5
Important Files Changed
Flowchartflowchart TD
A[FileViewerPage Request] --> B[Await params]
B --> C[getSession]
C --> D{session?.user?.id?}
D -- No --> E[redirect '/']
D -- Yes --> F[verifyWorkspaceMembership]
F --> G{hasPermission?}
G -- No --> H[redirect to workspace]
G -- Yes --> I[try: getWorkspaceFile]
I --> J{Error thrown?}
J -- Yes --> K[catch block]
K --> L[unstable_rethrow\nre-throws NEXT_REDIRECT / NEXT_NOT_FOUND]
L --> M[redirect to workspace\nfor real errors]
J -- No --> N{fileRecord exists?}
N -- No --> O[redirect to workspace]
N -- Yes --> P[render FileViewer]
style E fill:#f66,color:#fff
style H fill:#f66,color:#fff
style M fill:#f66,color:#fff
style O fill:#f66,color:#fff
style P fill:#6a6,color:#fff
style L fill:#fa0,color:#000
Last reviewed commit: 28046e8 |
|
@cursor review |
|
@cursor review |
Summary
aria-controlsaria prop usinguseId()to link trigger to listbox'use server'fromgetOAuthProviderStatus— it's only called from server components@media (prefers-reduced-motion: reduce)to global CSS (WCAG 2.3.3)<style jsx>/<style jsx global>blocks from 3 components into globals.cssimport { isEqual } from 'lodash'withimport isEqual from 'lodash/isEqual'in 6 filesunstable_rethrowinvalidateQueriesawaits withPromise.allin cancel-subscriptionsizesprop to<Image fill>in help-modalwillChangeconditional on animation state in landing-node; remove from SVG edgetoString()andnew Array(200).fill(0)in lazy state initializers{children}inAlertTitleand MDX h2/h3/h4 componentsexport default ensureUploadsDirectoryduplicate exportType of Change
Testing
Tested manually
Checklist