veza/apps/web/tsconfig.json
senke d15eb19e5b 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>
2026-02-11 22:56:26 +01:00

59 lines
No EOL
1.3 KiB
JSON

{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": [
"ES2020",
"DOM",
"DOM.Iterable",
"WebWorker"
],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
/* Strict Type Checking */
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true, // Enabled in audit remediation C12 — adds ~234 errors on top of 493 pre-existing; fix progressively
"noImplicitOverride": true,
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
]
},
"types": [
"vite/client"
]
},
"include": [
"src"
],
"exclude": [
"src/**/*.test.ts",
"src/**/*.test.tsx",
"src/**/*.example.ts",
"src/test/**/*",
"src/mocks/**/*"
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}