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

@@ -104,7 +104,7 @@ describe('phase-command-router — CLI arg translation (CJS path)', () => {
test('routes phase add-batch: --descriptions JSON array parses correctly', () => {
const calls = [];
const phase = makePhase({
cmdPhaseAddBatch: (cwd, descriptions, raw) => calls.push({ descriptions }),
cmdPhaseAddBatch: (cwd, descriptions, _raw) => calls.push({ descriptions }),
});
routePhaseCommand({
@@ -121,7 +121,7 @@ describe('phase-command-router — CLI arg translation (CJS path)', () => {
test('routes phase add-batch: positional args used when --descriptions absent', () => {
const calls = [];
const phase = makePhase({
cmdPhaseAddBatch: (cwd, descriptions, raw) => calls.push({ descriptions }),
cmdPhaseAddBatch: (cwd, descriptions, _raw) => calls.push({ descriptions }),
});
routePhaseCommand({
@@ -162,7 +162,7 @@ describe('phase-command-router — CLI arg translation (CJS path)', () => {
test('routes phase remove: --force flag sets opts.force:true', () => {
const calls = [];
const phase = makePhase({
cmdPhaseRemove: (cwd, phaseNum, opts, raw) => calls.push({ opts }),
cmdPhaseRemove: (cwd, phaseNum, opts, _raw) => calls.push({ opts }),
});
routePhaseCommand({ phase, args: ['phase', 'remove', '--force', '03'], cwd: '/p', raw: false, error: (m) => { throw new Error(m); } });
@@ -402,7 +402,7 @@ describe('phase-command-router — integration: real hub + CJS phase handler', (
test('dispatches phase add-batch through real hub with --descriptions', () => {
const calls = [];
const phase = makePhase({
cmdPhaseAddBatch: (cwd, descriptions, raw) => calls.push({ descriptions }),
cmdPhaseAddBatch: (cwd, descriptions, _raw) => calls.push({ descriptions }),
});
let errorMsg = null;