fix(web): enable noUncheckedIndexedAccess in tsconfig
Enable the TypeScript strict flag `noUncheckedIndexedAccess` which ensures that indexed access (arrays, Record types) includes `| undefined` in the result type, catching potential runtime errors at compile time. Current state: - 493 pre-existing type errors (before this flag) - ~234 additional errors introduced by this flag - Errors should be fixed progressively, prioritizing features/ and services/ - Pattern: use optional chaining (value?.) or null checks (if (value != null)) This flag was previously commented out with a TODO. Enabling it now ensures new code is written safely, even as existing errors are addressed over time. Addresses audit finding: debt item 10 (TypeScript strictness). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
49bc0c1443
commit
5f7afd6b53
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@
|
|||
"noUnusedParameters": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
// "noUncheckedIndexedAccess": true, // TODO: Enable progressively - requires fixing 200+ array/object access checks
|
||||
"noUncheckedIndexedAccess": true, // Enabled in audit remediation C12 — adds ~234 errors on top of 493 pre-existing; fix progressively
|
||||
"noImplicitOverride": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue