260 lines
11 KiB
Text
260 lines
11 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 83 files in 2.7s
|
||
|
||
React Doctor — web-ui
|
||
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
|
||
|
||
160 issues
|
||
Security: 2 errors, 2 warnings
|
||
Maintainability: 25 warnings
|
||
Accessibility: 92 warnings
|
||
Bugs: 3 errors, 24 warnings
|
||
Performance: 12 warnings
|
||
|
||
✖ socket/low-supply-chain-score ×2
|
||
socket/low-supply-chain-score
|
||
package.json:21
|
||
package.json:26
|
||
⚠ React function has high control-flow complexity ×12
|
||
react-doctor/no-high-complexity-react-function
|
||
src/components/AddToCartDialog.tsx:24
|
||
src/components/AddressForm.tsx:23
|
||
src/components/FloatingCartBar.tsx:28
|
||
src/components/PaymentAndOrderComponent.tsx:19
|
||
src/components/ProductCard.tsx:18
|
||
src/routes/home.index.tsx:80
|
||
src/routes/home.product.$id.tsx:23
|
||
src/routes/me.addresses.tsx:87
|
||
src/routes/me.edit-profile.tsx:12
|
||
src/routes/me.orders.$id.tsx:14
|
||
src/routes/me.orders.tsx:45
|
||
src/routes/me.orders.tsx:287
|
||
⚠ Control missing accessible label ×18
|
||
react-doctor/control-has-associated-label
|
||
src/components/AddToCartDialog.tsx:152
|
||
src/components/AddressForm.tsx:302
|
||
src/components/ComplaintForm.tsx:91
|
||
src/components/ComplaintForm.tsx:112
|
||
src/components/Dialog.tsx:37
|
||
src/components/me/MeOrderMenu.tsx:180
|
||
src/components/me/MeOrderMenu.tsx:210
|
||
src/routes/home.index.tsx:496
|
||
src/routes/home.index.tsx:504
|
||
src/routes/home.index.tsx:514
|
||
src/routes/home.product.$id.tsx:169
|
||
src/routes/home.product.$id.tsx:197
|
||
src/routes/login.tsx:210
|
||
src/routes/me.edit-profile.tsx:199
|
||
src/routes/me.edit-profile.tsx:311
|
||
src/routes/me.orders.$id.tsx:128
|
||
src/routes/me.orders.$id.tsx:380
|
||
src/routes/slot-view.tsx:179
|
||
⚠ Click handler missing keyboard handler ×28
|
||
react-doctor/click-events-have-key-events
|
||
src/components/AddToCartDialog.tsx:159
|
||
src/components/AddToCartDialog.tsx:195
|
||
src/components/AddToCartDialog.tsx:227
|
||
src/components/CheckoutAddressSelector.tsx:87
|
||
src/components/CheckoutAddressSelector.tsx:102
|
||
src/components/CheckoutAddressSelector.tsx:114
|
||
src/components/CheckoutAddressSelector.tsx:168
|
||
src/components/CheckoutAddressSelector.tsx:177
|
||
src/components/Dialog.tsx:26
|
||
src/components/FloatingCartBar.tsx:259
|
||
src/components/PaymentAndOrderComponent.tsx:122
|
||
src/components/ProductCard.tsx:96
|
||
src/components/ProductCard.tsx:153
|
||
src/routes/flash.tsx:223
|
||
src/routes/flash.tsx:246
|
||
src/routes/home.checkout.tsx:117
|
||
src/routes/home.index.tsx:532
|
||
src/routes/home.index.tsx:574
|
||
src/routes/login.tsx:227
|
||
src/routes/login.tsx:284
|
||
src/routes/slot-view.tsx:312
|
||
src/routes/slot-view.tsx:343
|
||
src/routes/slot-view.tsx:415
|
||
src/routes/slot-view.tsx:440
|
||
src/routes/stores.$storeId.product.$productId.tsx:43
|
||
src/routes/stores.$storeId.tsx:151
|
||
src/routes/stores.tsx:122
|
||
src/routes/stores.tsx:162
|
||
⚠ Interaction on static element ×28
|
||
react-doctor/no-static-element-interactions
|
||
src/components/AddToCartDialog.tsx:159
|
||
src/components/AddToCartDialog.tsx:195
|
||
src/components/AddToCartDialog.tsx:227
|
||
src/components/CheckoutAddressSelector.tsx:87
|
||
src/components/CheckoutAddressSelector.tsx:102
|
||
src/components/CheckoutAddressSelector.tsx:114
|
||
src/components/CheckoutAddressSelector.tsx:168
|
||
src/components/CheckoutAddressSelector.tsx:177
|
||
src/components/Dialog.tsx:26
|
||
src/components/FloatingCartBar.tsx:259
|
||
src/components/PaymentAndOrderComponent.tsx:122
|
||
src/components/ProductCard.tsx:96
|
||
src/components/ProductCard.tsx:153
|
||
src/routes/flash.tsx:223
|
||
src/routes/flash.tsx:246
|
||
src/routes/home.checkout.tsx:117
|
||
src/routes/home.index.tsx:532
|
||
src/routes/home.index.tsx:574
|
||
src/routes/login.tsx:227
|
||
src/routes/login.tsx:284
|
||
src/routes/slot-view.tsx:312
|
||
src/routes/slot-view.tsx:343
|
||
src/routes/slot-view.tsx:415
|
||
src/routes/slot-view.tsx:440
|
||
src/routes/stores.$storeId.product.$productId.tsx:43
|
||
src/routes/stores.$storeId.tsx:151
|
||
src/routes/stores.tsx:122
|
||
src/routes/stores.tsx:162
|
||
⚠ Large component is hard to read and change ×7
|
||
react-doctor/no-giant-component
|
||
src/components/AddressForm.tsx:23
|
||
src/components/PaymentAndOrderComponent.tsx:19
|
||
src/routes/home.index.tsx:80
|
||
src/routes/home.product.$id.tsx:23
|
||
src/routes/login.tsx:12
|
||
src/routes/me.edit-profile.tsx:12
|
||
src/routes/me.orders.$id.tsx:14
|
||
⚠ Label missing associated control ×4
|
||
react-doctor/label-has-associated-control
|
||
src/components/AddressForm.tsx:301
|
||
src/routes/me.edit-profile.tsx:172
|
||
src/routes/me.edit-profile.tsx:185
|
||
src/routes/me.edit-profile.tsx:198
|
||
⚠ iframe missing sandbox attribute
|
||
react-doctor/iframe-missing-sandbox
|
||
src/components/AddressForm.tsx:387
|
||
⚠ Async mutating handler without re-entry guard ×2
|
||
react-doctor/no-async-event-handler-without-reentry-guard
|
||
src/components/ComplaintForm.tsx:69
|
||
src/components/me/MeOrderMenu.tsx:90
|
||
⚠ Field relies on placeholder text for its label ×12
|
||
react-doctor/no-placeholder-only-field
|
||
src/components/ComplaintForm.tsx:97
|
||
src/components/PaymentAndOrderComponent.tsx:134
|
||
src/components/me/MeOrderMenu.tsx:185
|
||
src/components/me/MeOrderMenu.tsx:222
|
||
src/routes/me.coupons.tsx:148
|
||
src/routes/me.edit-profile.tsx:173
|
||
src/routes/me.edit-profile.tsx:186
|
||
src/routes/me.edit-profile.tsx:265
|
||
src/routes/me.edit-profile.tsx:272
|
||
src/routes/me.edit-profile.tsx:328
|
||
src/routes/me.orders.$id.tsx:256
|
||
src/routes/me.orders.$id.tsx:392
|
||
⚠ State adjusted after a prop changes
|
||
react-doctor/no-adjust-state-on-prop-change
|
||
src/components/FloatingCartBar.tsx:54
|
||
⚠ Missing effect dependencies ×9
|
||
react-doctor/exhaustive-deps
|
||
src/components/FloatingCartBar.tsx:55
|
||
src/components/ProtectedRoute.tsx:16
|
||
src/hooks/checkout-hooks.ts:57
|
||
src/routes/flash.tsx:44
|
||
src/routes/home.index.tsx:168
|
||
src/routes/home.index.tsx:187
|
||
src/routes/home.index.tsx:216
|
||
src/routes/home.search.tsx:69
|
||
src/routes/location-selector.tsx:272
|
||
⚠ transition: all animates everything ×8
|
||
react-doctor/no-transition-all
|
||
src/components/FloatingCartBar.tsx:116
|
||
src/components/PaymentAndOrderComponent.tsx:164
|
||
src/components/ProductCard.tsx:96
|
||
src/routes/flash.tsx:223
|
||
src/routes/home.index.tsx:489
|
||
src/routes/home.index.tsx:496
|
||
src/routes/home.index.tsx:504
|
||
src/routes/stores.tsx:120
|
||
⚠ Time or random value in JSX
|
||
react-doctor/rendering-hydration-mismatch-time
|
||
src/components/FloatingCartBar.tsx:163
|
||
⚠ Array index used as a key ×7
|
||
react-doctor/no-array-index-as-key
|
||
src/components/me/NextOrderGlimpse.tsx:78
|
||
src/routes/home.index.tsx:515
|
||
src/routes/home.product.$id.tsx:198
|
||
src/routes/home.product.$id.tsx:320
|
||
src/routes/home.product.$id.tsx:383
|
||
src/routes/home.product.$id.tsx:401
|
||
src/routes/me.orders.$id.tsx:285
|
||
⚠ Interactive control contains another focusable control ×2
|
||
react-doctor/html-no-nested-interactive
|
||
src/components/me/NextOrderGlimpse.tsx:99
|
||
src/routes/me.orders.tsx:195
|
||
⚠ Data passed to parent via effect
|
||
react-doctor/no-pass-data-to-parent
|
||
src/hooks/checkout-hooks.ts:54
|
||
⚠ Auth token in web storage
|
||
react-doctor/auth-token-in-web-storage
|
||
src/lib/auth-context.tsx:74
|
||
⚠ Unstable context provider value
|
||
react-doctor/jsx-no-constructed-context-values
|
||
src/lib/auth-context.tsx:116
|
||
⚠ Duplicated JSX structure ×6
|
||
react-doctor/duplicate-jsx-subtree
|
||
src/routes/cart.tsx:42
|
||
src/routes/cart.tsx:58
|
||
src/routes/cart.tsx:72
|
||
src/routes/cart.tsx:118
|
||
src/routes/cart.tsx:121
|
||
src/routes/flash.checkout.tsx:134
|
||
✖ State updater has side effects ×2
|
||
react-doctor/no-impure-state-updater
|
||
src/routes/home.index.tsx:199
|
||
src/routes/login.tsx:53
|
||
⚠ Side effect inside a state updater function ×2
|
||
react-doctor/no-side-effect-in-state-updater-function
|
||
src/routes/home.index.tsx:201
|
||
src/routes/login.tsx:55
|
||
✖ Effect subscription or timer never cleaned up
|
||
react-doctor/effect-needs-cleanup
|
||
src/routes/location-selector.tsx:209
|
||
⚠ State only used in handlers ×2
|
||
react-doctor/rerender-state-only-in-handlers
|
||
src/routes/login.tsx:17
|
||
src/routes/me.edit-profile.tsx:19
|
||
⚠ Button missing explicit type
|
||
react-doctor/button-has-type
|
||
src/routes/login.tsx:232
|
||
⚠ createObjectURL without revokeObjectURL
|
||
react-doctor/no-create-object-url-without-revoke
|
||
src/routes/me.edit-profile.tsx:83
|
||
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-4f05b8a9-b1e2-41ab-b0c3-ac7526509c0d
|
||
|
||
────────────────────────────────────────────────────────────
|
||
|
||
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.
|