116 lines
5.2 KiB
Text
116 lines
5.2 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 35 files in 2.8s
|
||
|
||
React Doctor — fallback-ui
|
||
Score disabled by --no-score. Want something custom to your company? Contact us at https://react.doctor/enterprise.
|
||
|
||
40 issues
|
||
Security: 2 errors
|
||
Maintainability: 7 warnings
|
||
Bugs: 2 errors, 7 warnings
|
||
Accessibility: 19 warnings
|
||
Performance: 3 warnings
|
||
|
||
✖ socket/low-supply-chain-score ×2
|
||
socket/low-supply-chain-score
|
||
package.json:20
|
||
package.json:26
|
||
⚠ Large component is hard to read and change ×2
|
||
react-doctor/no-giant-component
|
||
src/components/3d/Characters.tsx:119
|
||
src/routes/inauguration.tsx:5
|
||
⚠ fetch Response consumed without status check
|
||
react-doctor/no-fetch-response-used-without-status-check
|
||
src/routes/demo.tsx:51
|
||
⚠ Control missing accessible label ×6
|
||
react-doctor/control-has-associated-label
|
||
src/routes/demo.tsx:110
|
||
src/routes/user-connect.tsx:124
|
||
src/routes/user-connect.tsx:140
|
||
src/routes/user-connect.tsx:170
|
||
src/routes/user-connect.tsx:254
|
||
src/routes/user-connect.tsx:284
|
||
⚠ Field relies on placeholder text for its label ×8
|
||
react-doctor/no-placeholder-only-field
|
||
src/routes/demo.tsx:121
|
||
src/routes/demo.tsx:139
|
||
src/routes/demo.tsx:150
|
||
src/routes/order-details.tsx:187
|
||
src/routes/order-details.tsx:193
|
||
src/routes/user-connect.tsx:89
|
||
src/routes/user-details.tsx:173
|
||
src/routes/user-details.tsx:179
|
||
⚠ Label missing associated control ×5
|
||
react-doctor/label-has-associated-control
|
||
src/routes/demo.tsx:138
|
||
src/routes/demo.tsx:149
|
||
src/routes/demo.tsx:211
|
||
src/routes/demo.tsx:218
|
||
src/routes/user-connect.tsx:123
|
||
⚠ Array index used as a key ×4
|
||
react-doctor/no-array-index-as-key
|
||
src/routes/demo.tsx:170
|
||
src/routes/demo.tsx:245
|
||
src/routes/order-details.tsx:225
|
||
src/routes/vendor-order-list.tsx:137
|
||
⚠ State update after await in an effect
|
||
react-doctor/no-set-state-after-await-in-effect
|
||
src/routes/home.tsx:10
|
||
✖ Effect subscription or timer never cleaned up ×2
|
||
react-doctor/effect-needs-cleanup
|
||
src/routes/inauguration.tsx:74
|
||
src/routes/location-marker.tsx:37
|
||
⚠ transition: all animates everything ×2
|
||
react-doctor/no-transition-all
|
||
src/routes/inauguration.tsx:283
|
||
src/routes/inauguration.tsx:286
|
||
⚠ State only used in handlers
|
||
react-doctor/rerender-state-only-in-handlers
|
||
src/routes/location-marker.tsx:32
|
||
⚠ React function has high control-flow complexity ×4
|
||
react-doctor/no-high-complexity-react-function
|
||
src/routes/order-details.tsx:17
|
||
src/routes/user-connect.tsx:4
|
||
src/routes/user-details.tsx:17
|
||
src/routes/vendor-order-list.tsx:31
|
||
⚠ Duplicated JSX structure
|
||
react-doctor/duplicate-jsx-subtree
|
||
src/routes/order-details.tsx:154
|
||
⚠ Missing effect dependencies
|
||
react-doctor/exhaustive-deps
|
||
src/routes/vendor-order-list.tsx:129
|
||
Full diagnostics written to /var/folders/6t/3blzq7_j6p95xzry6t7c14hw0000gn/T/react-doctor-cab1d2de-dc17-4d09-b810-08dc13ba8e54
|
||
|
||
────────────────────────────────────────────────────────────
|
||
|
||
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.
|