249 lines
12 KiB
Text
249 lines
12 KiB
Text
Resolving dependencies
|
||
Resolved, downloaded and extracted [2]
|
||
|
||
Agent guidance
|
||
- Treat React Doctor diagnostics as starting hypotheses. Read the relevant code before confirming or suppressing each finding.
|
||
- For each group, decide true positive, false positive, or needs-human-review, then assign high/medium/low confidence.
|
||
- Do not suppress a finding without evidence from the file in question. Confidence requires code context.
|
||
- Understand the root cause before editing. Fix the underlying code instead of changing react-doctor config or suppressing rules unless explicitly asked.
|
||
- Investigate deeply where relevant: race conditions, security-sensitive flows, state propagation, multi-file refactors, and downstream dependency chains.
|
||
- Ignore pure style preferences, theoretical issues without real impact, missing features, and unrelated pre-existing code.
|
||
- Start with high-confidence fixes that preserve behavior. Leave low-confidence or product-dependent changes as notes.
|
||
- Run `npx react-doctor@latest --verbose --scope changed` before and after changes, plus relevant tests after each focused batch.
|
||
- When available, spawn subagents or isolated worktrees for independent rule families, then review and merge only the best safe fixes.
|
||
- Split unrelated, broad, or behavior-changing work into separate PRs/branches instead of one large cleanup.
|
||
- When one rule spans dozens of files (a migration-scale change), fix a representative sample first, confirm the recipe holds, and get the code owner's sign-off before changing the rest. Don't mass-fix a broad pattern in one unreviewed pass.
|
||
- For confirmed issues that cannot be fixed now, create GitHub issues with the rule, file/line, confidence, impact, and proposed fix.
|
||
- If a fix needs an API, UX, or architecture decision, stop and ask before editing.
|
||
|
||
✔ Scanned 169 files in 2.7s
|
||
|
||
React Doctor — admin-ui
|
||
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
|
||
|
||
145 issues
|
||
Bugs: 5 errors, 71 warnings
|
||
Maintainability: 34 warnings
|
||
Performance: 32 warnings
|
||
Correctness: 2 warnings
|
||
Security: 1 error
|
||
|
||
⚠ Array index used as a key ×13
|
||
react-doctor/no-array-index-as-key
|
||
app/(drawer)/dashboard/complaints/index.tsx:175
|
||
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:77
|
||
app/(drawer)/dashboard/manage-orders/order-details/[id].tsx:357
|
||
app/(drawer)/dashboard/manage-orders/orders/index.tsx:399
|
||
app/(drawer)/dashboard/products/detail/[id].tsx:337
|
||
app/(drawer)/dashboard/products/detail/[id].tsx:363
|
||
app/(drawer)/dashboard/products/detail/[id].tsx:417
|
||
app/(drawer)/dashboard/products/detail/[id].tsx:433
|
||
components/SlotForm.tsx:177
|
||
components/SnippetOrdersView.tsx:68
|
||
components/SnippetOrdersView.tsx:140
|
||
src/components/CouponForm.tsx:211
|
||
src/components/TagMenu.tsx:101
|
||
⚠ Inline handler in list renderItem ×5
|
||
react-doctor/rn-list-callback-per-row
|
||
app/(drawer)/dashboard/complaints/index.tsx:187
|
||
app/(drawer)/dashboard/complaints/index.tsx:198
|
||
app/(drawer)/dashboard/complaints/index.tsx:210
|
||
src/components/CouponForm.tsx:459
|
||
src/components/CouponForm.tsx:464
|
||
⚠ React function has high control-flow complexity ×10
|
||
react-doctor/no-high-complexity-react-function
|
||
app/(drawer)/dashboard/coupons/index.tsx:11
|
||
app/(drawer)/dashboard/customize-app/index.tsx:130
|
||
app/(drawer)/dashboard/customize-app/popular-items.tsx:113
|
||
app/(drawer)/dashboard/dashboard-banners/index.tsx:15
|
||
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:264
|
||
app/(drawer)/dashboard/manage-orders/order-details/[id].tsx:18
|
||
app/(drawer)/dashboard/manage-orders/orders/index.tsx:82
|
||
app/(drawer)/dashboard/prices-overview/index.tsx:33
|
||
app/(drawer)/dashboard/products/detail/[id].tsx:141
|
||
components/VendorSnippetForm.tsx:18
|
||
⚠ Duplicated JSX structure ×8
|
||
react-doctor/duplicate-jsx-subtree
|
||
app/(drawer)/dashboard/coupons/index.tsx:77
|
||
app/(drawer)/dashboard/customize-app/all-items-order.tsx:192
|
||
app/(drawer)/dashboard/customize-app/all-items-order.tsx:218
|
||
app/(drawer)/dashboard/customize-app/all-items-order.tsx:251
|
||
app/(drawer)/dashboard/rebalance-orders/index.tsx:66
|
||
app/(drawer)/dashboard/rebalance-orders/index.tsx:92
|
||
app/(drawer)/dashboard/rebalance-orders/index.tsx:221
|
||
app/(drawer)/dashboard/user-management/[id].tsx:134
|
||
⚠ Array lookup inside a loop ×18
|
||
react-doctor/js-set-map-lookups
|
||
app/(drawer)/dashboard/coupons/index.tsx:245
|
||
app/(drawer)/dashboard/coupons/index.tsx:393
|
||
app/(drawer)/dashboard/dashboard-banners/index.tsx:372
|
||
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:363
|
||
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:596
|
||
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:631
|
||
app/(drawer)/dashboard/prices-overview/index.tsx:218
|
||
app/(drawer)/dashboard/product-tags/edit/index.tsx:100
|
||
app/(drawer)/dashboard/product-tags/edit/index.tsx:101
|
||
components/ProductsSelector.tsx:60
|
||
components/ProductsSelector.tsx:61
|
||
components/ProductsSelector.tsx:80
|
||
components/ProductsSelector.tsx:105
|
||
components/SlotForm.tsx:192
|
||
components/SlotForm.tsx:195
|
||
components/SlotForm.tsx:202
|
||
components/SnippetOrdersView.tsx:65
|
||
src/components/VariantStockDialog.tsx:112
|
||
⚠ Loading flag reset outside finally ×7
|
||
react-doctor/no-loading-flag-reset-outside-finally
|
||
app/(drawer)/dashboard/coupons/index.tsx:253
|
||
app/(drawer)/dashboard/coupons/index.tsx:401
|
||
app/(drawer)/dashboard/dashboard-banners/index.tsx:50
|
||
app/(drawer)/dashboard/product-tags/index.tsx:94
|
||
app/(drawer)/dashboard/rebalance-orders/index.tsx:133
|
||
app/(drawer)/dashboard/slots/index.tsx:244
|
||
app/(drawer)/dashboard/user-management/index.tsx:182
|
||
⚠ Dimensions.get over useWindowDimensions
|
||
react-doctor/rn-no-dimensions-get
|
||
app/(drawer)/dashboard/coupons/index.tsx:505
|
||
⚠ Legacy platform-specific shadow styles ×6
|
||
react-doctor/rn-no-legacy-shadow-styles
|
||
app/(drawer)/dashboard/customize-app/all-items-order.tsx:317
|
||
app/(drawer)/dashboard/customize-app/all-items-order.tsx:334
|
||
app/(drawer)/dashboard/product-tags/order.tsx:305
|
||
app/(drawer)/dashboard/product-tags/order.tsx:322
|
||
src/components/TagForm.tsx:307
|
||
src/components/TagForm.tsx:322
|
||
⚠ Large component is hard to read and change ×11
|
||
react-doctor/no-giant-component
|
||
app/(drawer)/dashboard/customize-app/index.tsx:262
|
||
app/(drawer)/dashboard/customize-app/popular-items.tsx:113
|
||
app/(drawer)/dashboard/dashboard-banners/index.tsx:15
|
||
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:264
|
||
app/(drawer)/dashboard/manage-orders/order-details/[id].tsx:18
|
||
app/(drawer)/dashboard/manage-orders/orders/index.tsx:82
|
||
app/(drawer)/dashboard/manage-orders/orders/index.tsx:480
|
||
app/(drawer)/dashboard/products/detail/[id].tsx:141
|
||
components/OrderOptionsMenu.tsx:43
|
||
src/components/CouponForm.tsx:77
|
||
src/components/ProductForm.tsx:161
|
||
⚠ Non-virtualized mapped list in ScrollView ×6
|
||
react-doctor/rn-no-scrollview-mapped-list
|
||
app/(drawer)/dashboard/customize-app/index.tsx:450
|
||
app/(drawer)/dashboard/products/detail/[id].tsx:336
|
||
app/(drawer)/dashboard/products/detail/[id].tsx:416
|
||
app/(drawer)/dashboard/products/detail/[id].tsx:432
|
||
components/ProductListDialog.tsx:26
|
||
src/components/GlobalProductForm.tsx:103
|
||
⚠ array.find() inside a loop ×2
|
||
react-doctor/js-index-maps
|
||
app/(drawer)/dashboard/customize-app/popular-items.tsx:147
|
||
src/components/TagForm.tsx:107
|
||
⚠ Missing effect dependencies ×18
|
||
react-doctor/exhaustive-deps
|
||
app/(drawer)/dashboard/dashboard-banners/edit/[id].tsx:73
|
||
app/(drawer)/dashboard/dashboard-banners/index.tsx:45
|
||
app/(drawer)/dashboard/manage-orders/delivery-sequences/index.tsx:422
|
||
app/(drawer)/dashboard/prices-overview/index.tsx:186
|
||
app/(drawer)/dashboard/prices-overview/index.tsx:201
|
||
app/(drawer)/dashboard/prices-overview/index.tsx:213
|
||
app/(drawer)/dashboard/products/index.tsx:193
|
||
app/(drawer)/dashboard/products/index.tsx:197
|
||
app/(drawer)/dashboard/products/index.tsx:201
|
||
app/(drawer)/dashboard/products/index.tsx:203
|
||
components/ProductsSelector.tsx:99
|
||
components/VendorSnippetForm.tsx:106
|
||
components/context/staff-auth-context.tsx:55
|
||
components/context/staff-auth-context.tsx:95
|
||
services/notif-service/notif-checker.tsx:29
|
||
services/notif-service/notif-context.tsx:95
|
||
src/components/GlobalProductForm.tsx:49
|
||
src/components/VariantStockDialog.tsx:52
|
||
⚠ State only used in handlers ×5
|
||
react-doctor/rerender-state-only-in-handlers
|
||
app/(drawer)/dashboard/dashboard-banners/index.tsx:23
|
||
app/(drawer)/dashboard/products/detail/[id].tsx:24
|
||
app/(drawer)/dashboard/products/detail/[id].tsx:25
|
||
components/BannerForm.tsx:53
|
||
src/components/CouponForm.tsx:83
|
||
✖ Numeric && renders bare zero ×2
|
||
react-doctor/rn-no-falsy-and-render
|
||
app/(drawer)/dashboard/manage-orders/orders/index.tsx:301
|
||
components/UserIncidentsView.tsx:153
|
||
⚠ Inline renderItem on list ×4
|
||
react-doctor/rn-no-inline-flatlist-renderitem
|
||
app/(drawer)/dashboard/prices-overview/index.tsx:351
|
||
app/(drawer)/dashboard/rebalance-orders/index.tsx:227
|
||
app/(drawer)/dashboard/slots/index.tsx:301
|
||
src/components/CouponForm.tsx:457
|
||
⚠ fetch Response consumed without status check ×7
|
||
react-doctor/no-fetch-response-used-without-status-check
|
||
app/(drawer)/dashboard/product-tags/add.tsx:26
|
||
app/(drawer)/dashboard/product-tags/edit/index.tsx:39
|
||
app/(drawer)/dashboard/products/add.tsx:60
|
||
app/(drawer)/dashboard/products/detail/[id].tsx:42
|
||
app/(drawer)/dashboard/products/edit.tsx:131
|
||
components/BannerForm.tsx:75
|
||
components/StoreForm.tsx:72
|
||
⚠ await inside a loop ×2
|
||
react-doctor/async-await-in-loop
|
||
app/(drawer)/dashboard/products/add.tsx:60
|
||
app/(drawer)/dashboard/products/edit.tsx:131
|
||
⚠ useMemo before an early return
|
||
react-doctor/rerender-memo-before-early-return
|
||
app/(drawer)/dashboard/products/index.tsx:230
|
||
⚠ Empty default prop breaks memo ×2
|
||
react-doctor/rerender-memo-with-default-value
|
||
components/ProductsSelector.tsx:44
|
||
components/ProductsSelector.tsx:46
|
||
✖ Module removed from react-native core
|
||
react-doctor/rn-no-deprecated-modules
|
||
components/SnippetMenu.tsx:2
|
||
⚠ Unstable context provider value ×2
|
||
react-doctor/jsx-no-constructed-context-values
|
||
components/context/staff-auth-context.tsx:99
|
||
services/notif-service/notif-context.tsx:99
|
||
⚠ react-doctor/expo-gitignore
|
||
react-doctor/expo-gitignore
|
||
package.json
|
||
⚠ react-doctor/expo-lockfile
|
||
react-doctor/expo-lockfile
|
||
package.json
|
||
✖ socket/low-supply-chain-score
|
||
socket/low-supply-chain-score
|
||
package.json:28
|
||
⚠ Non-component export in component file ×5
|
||
react-doctor/only-export-components
|
||
services/notif-service/notif-context.tsx:22
|
||
services/toaster.tsx:5
|
||
services/toaster.tsx:17
|
||
services/toaster.tsx:28
|
||
services/toaster.tsx:39
|
||
⚠ Effects chained together
|
||
react-doctor/no-effect-chain
|
||
src/components/CouponForm.tsx:106
|
||
⚠ State adjusted after a prop changes ×3
|
||
react-doctor/no-adjust-state-on-prop-change
|
||
src/components/TagForm.tsx:76
|
||
src/components/TagForm.tsx:86
|
||
src/components/TagForm.tsx:88
|
||
✖ Hook called conditionally ×2
|
||
react-doctor/rules-of-hooks
|
||
src/components/TagForm.tsx:159
|
||
src/components/TagForm.tsx:169
|
||
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-a8073fcc-df20-44d2-b93a-66b36001605b
|
||
|
||
────────────────────────────────────────────────────────────
|
||
|
||
Docs: https://react.doctor/docs
|
||
Learn more about fixing issues, setting up CI/CD, and
|
||
configuring rules with a config file
|
||
|
||
GitHub: https://github.com/millionco/react-doctor
|
||
Report issues and star the repository!
|
||
|
||
|
||
React Doctor is not installed in this project.
|
||
Ask the user if they would like to set it up, then run:
|
||
|
||
npx react-doctor install --yes
|
||
|
||
This adds agent skill files, a `doctor` package script, and react-doctor as a dev dependency.
|