chore: clean up clear-cut ESLint warnings (#732) (#734)

Pay down pre-existing error→warn lint debt. Removes dead imports/vars, unused functions, redundant regex/string escapes, and stale eslint-disable directives; converts unused `catch (_e)` to optional catch binding (src/*.cts).

No behavior change. Lint 345→125 warnings (0 errors); deferred categories (n/no-process-exit, test-sleeps, control-regex) tracked in #732 for follow-up. Full test suite green (0 failures); code-review verified all removals unused and all escape fixes semantics-preserving.

Closes #732

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-06-06 11:24:48 -04:00
committed by GitHub
parent 42b74100f1
commit ba231ecbfc
117 changed files with 132 additions and 350 deletions

View File

@@ -27,9 +27,6 @@ const MIGRATED_PHASE_HEADING_RE = /^#{2,4}\s*(?:\[[^\]]+\]\s*)?Phase\s+\d+-\d{2}
// The optional bracket-token prefix (e.g., [GSD]) must be tested before the emoji group.
const MILESTONE_HEADING_RE = /^##\s+(?:\[[^\]]+\]\s+|Roadmap\s+|[✅🚧]\s*)?v(\d+)\.(\d+)(?:\s|:)/iu;
// Matches checklist phase references: - [ ] **Phase N:** or - [x] **Phase N:** (also decimal)
const CHECKLIST_PHASE_RE = /^(\s*-\s*\[[ x]\]\s*\*{0,2})Phase\s+(\d+[A-Z]?(?:\.\d+)*)\s*:/gi;
// ─── Types ────────────────────────────────────────────────────────────────────
interface ParsedPhaseEntry {
@@ -199,19 +196,6 @@ function buildNewDirName(oldDirName: string, newId: string, projectCode: string
return projectCode ? `${projectCode}-${newBase}` : newBase;
}
/**
* Read project_code from config.json if present.
*/
function readProjectCode(configPath: string): string | null {
try {
const raw = fs.readFileSync(configPath, 'utf8');
const parsed = JSON.parse(raw) as Record<string, unknown>;
return typeof parsed['project_code'] === 'string' ? parsed['project_code'] : null;
} catch {
return null;
}
}
// ─── computeMigrationPlan ─────────────────────────────────────────────────────
/**