Перейти к содержимому

Clean Up Messy Code with AI — 6 Steps That Actually Work (English)#ias #Commitsmall #software

Commit Small

0:00 / 0:00

Clean Up Messy Code with AI — 6 Steps That Actually Work (English)#ias #Commitsmall #software

226 просмотров · 7 дней назад
Commit Small
15 подписчиков
226 просмотров · 7 дней назад
Messy code doesn’t appear overnight — it accumulates one rushed commit at a time. In this video I walk through the exact 6-step workflow I use to clean up a codebase with AI as a copilot, without breaking anything along the way. You’ll learn how to measure the mess before you touch it, hand the boring work to your formatter and linter, delete dead code with confidence, and write AI prompts that produce real refactors instead of confident nonsense. The 6 steps: 1. Diagnose — run your linter, type checker, and duplication report to get a baseline 2. Automatic formatting — Prettier and ESLint –fix, in their own commit 3. Delete dead code — knip and depcheck for unused exports and orphaned dependencies 4. Refactor with AI — give it constraints, one function at a time 5. Names and small functions — a before/after that says what it does 6. Verify — run the suite, read the diff, generate edge-case tests Examples are in JavaScript and TypeScript, but the workflow applies to any language. Chapters: 0:00 Intro 0:15 Step 1 — Diagnose 0:40 Step 2 — Automatic formatting 1:04 Step 3 — Delete dead code 1:26 Step 4 — Refactor with AI 1:59 Step 5 — Names and small functions 2:23 Step 6 — Verify 2:42 Recap Tools mentioned: Prettier, ESLint, TypeScript, jscpd, knip, depcheck Subscribe for weekly, practical cleanups. Small commits, cleaner code. Note: the narration in this video is AI-generated. Tags clean code, refactoring, refactoring with ai, ai coding, javascript refactoring, typescript, eslint, prettier, dead code, technical debt, code quality, code review, knip, depcheck, unit testing