Enable noUncheckedIndexedAccess in tsconfig

Tighter type-checking: array indexing and dynamic property access now
return T | undefined rather than T. Catches bugs where code assumes a
key exists without checking.

No code changes were needed — the existing modules already either:
  - cast through Record<string, unknown> (configFile.ts), where access
    is already 'unknown';
  - cast values from parseArgs to '... | undefined' (cli.ts), already
    nullable; or
  - use static, statically-known fields (Config, ConfigOverrides,
    DEFAULT_CONFIG).

tsc --noEmit remains clean. The full test suite still passes.
This commit is contained in:
2026-06-17 16:35:33 -05:00
parent 94d963d8ef
commit 9617758d8b
+2 -1
View File
@@ -9,7 +9,8 @@
"noEmit": true, "noEmit": true,
"allowImportingTsExtensions": true, "allowImportingTsExtensions": true,
"verbatimModuleSyntax": true, "verbatimModuleSyntax": true,
"resolveJsonModule": true "resolveJsonModule": true,
"noUncheckedIndexedAccess": true
}, },
"include": ["src/**/*.ts"] "include": ["src/**/*.ts"]
} }