Repair React issues in small batches
Baseline the scan, fix a small batch of real errors or warnings, and verify each change improves it without regressions.
Use this when
Use this when a React codebase has actionable React Doctor errors or warnings and the safest repair strategy is to work in small, verified batches.
How it runs
- Record the complete React Doctor baseline before editing.
- Choose up to five genuine errors, trace their causes, and make the smallest coherent repairs.
- Rerun the same scan and relevant repository checks, reverting changes that do not produce a verified improvement.
- Repeat for remaining errors and then high-confidence warnings until a terminal state is reached.
Done when
✓ React Doctor improves without introducing regressions. Compare the baseline and final scan under the same command and confirm each retained change with the repository checks relevant to the files touched.
Why it works
Small batches keep the causal link between a repair and the resulting scan clear. Repeating the same scan and repository checks prevents a cleaner diagnostic score from masking a product regression.
Implementation note
Do not manufacture a clean result by disabling rules, excluding files, adding suppressions, or deleting meaningful behavior. Ask before dependency upgrades, destructive changes, or actions outside the repository.
More refactoring loops
Migrate an API import by import
Sweep a codebase from a legacy API to its v2 replacement with tests and typecheck as the safety net, capped at 30 turns.
Dead code elimination
Hunt down unreferenced exports, unused files, and unreachable branches, deleting them in small verified steps until the analyzer reports clean.
Tidy code, one safe change at a time
Prove one small cleanup is safe, make the smallest useful change, and keep it only after existing checks pass.