- Status: Accepted
- Date: 2026-11-13
Context
Type errors in identity and credential handling are security bugs. The codebase targets Node.js 26 and modern browsers.
Decision
tsconfig.base.jsonenablesstrictplusnoUncheckedIndexedAccess,exactOptionalPropertyTypes,noImplicitOverride,noPropertyAccessFromIndexSignature,noUnused*andverbatimModuleSyntax.- All packages are native ESM with
module/moduleResolution: NodeNext; Next.js usesBundlerresolution as it requires. types: []by default — packages opt in to@types/nodeexplicitly, so browser-safe code cannot accidentally use Node APIs.anyis banned by lint (no-explicit-any); an exception requires an inline disable comment with a justification.- TypeScript is pinned to
~6.0. TypeScript 7 (native compiler) is released, but typescript-eslint, which provides our type-aware lint rules, supports<6.1only. Upgrade when it adds support. - NestJS decorator metadata is enabled only in
apps/api; its tests compile through SWC because the default Vitest transformer cannot emit decorator metadata.
Consequences
Stricter code at the cost of some verbosity (e.g. declaring ProcessEnv keys).
The TS 7 upgrade is tracked as a follow-up.