chore(#552): lint hand-written bin/lib/*.cjs and remove surfaced dead code (#554)

The GENERATED_CJS_IGNORES array in eslint.config.mjs wrongly listed 12
hand-written bin/lib/*.cjs modules as "generated" and excluded them from
linting. Genuinely-generated artifacts are already covered by the
**/*.generated.cjs glob and the ADR-457 semver-compare.cjs entry, so the
array only created a coverage gap. Remove it so the 12 modules are linted
under the existing get-shit-done/bin/**/*.cjs ruleset.

Linting them surfaces two dormant dead-code findings, both removed here:

- phase-lifecycle.cjs: stale `eslint-disable-next-line no-cond-assign`
  directive — the loop already uses the parenthesized-assignment form the
  rule permits by default, so it suppressed nothing.
- state-document.cjs: vestigial `tempField`/`tempDefaults` locals (and
  their comment) left over from a refactor to an inline `.some(...)` check.

Pure dead-code/lint-config cleanup; no user-facing behavior change.

Closes #552

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-05-31 20:28:43 -04:00
committed by GitHub
parent 01f894078d
commit 84e9888d25
2 changed files with 0 additions and 5 deletions

View File

@@ -55,7 +55,6 @@ function deriveProgressFromRoadmap(roadmapContent) {
let totalPlansSum = 0;
const planCellPattern = /\|\s*\d+[^|]*\|\s*(\d+)\/(\d+)\s*\|/gi;
let pm;
// eslint-disable-next-line no-cond-assign
while ((pm = planCellPattern.exec(roadmapContent)) !== null) {
totalPlansSum += parseInt(pm[2], 10);
}

View File

@@ -238,10 +238,6 @@ function isStateTemplateDefault(field, value) {
function stateReplaceFieldIfTemplate(content, field, knownDefaults, newValue) {
if (newValue === null || newValue === undefined) return content;
const existing = stateExtractField(content, field);
// Build a temporary KNOWN_TEMPLATE_DEFAULTS-compatible lookup so we can reuse
// the isStateTemplateDefault logic for the provided knownDefaults array.
const tempField = '__tmp__';
const tempDefaults = { [tempField]: knownDefaults || [] };
// Inline check: absent/blank → always write; in list → write; else → skip.
if (existing === null || existing === undefined || existing.trim() === '') {
return stateReplaceField(content, field, newValue) || content;