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

@@ -61,7 +61,7 @@ function isIntelEnabled(planningDir: string): boolean {
(config.intel as Record<string, unknown>).enabled === true
) return true;
return false;
} catch (_e) {
} catch {
return false;
}
}
@@ -104,7 +104,7 @@ function safeReadJson(filePath: string): IntelData | null {
const raw = platformReadSync(filePath);
if (raw === null) return null;
return JSON.parse(raw) as IntelData;
} catch (_e) {
} catch {
return null;
}
}
@@ -118,7 +118,7 @@ function hashFile(filePath: string): string | null {
const content = platformReadSync(filePath);
if (content === null) return null;
return crypto.createHash('sha256').update(content).digest('hex');
} catch (_e) {
} catch {
return null;
}
}
@@ -175,22 +175,6 @@ function matchesInValue(value: unknown, lowerTerm: string): boolean {
return false;
}
/**
* Search for a term in arch.md text content.
* Returns matching lines.
*/
function searchArchMd(filePath: string, term: string): string[] {
try {
const content = platformReadSync(filePath);
if (content === null) return [];
const lowerTerm = term.toLowerCase();
const lines = content.split(/\r?\n/);
return lines.filter(line => line.toLowerCase().includes(lowerTerm));
} catch (_e) {
return [];
}
}
// ─── Public API ──────────────────────────────────────────────────────────────
interface IntelQueryResult {