Declarative .mdcCursor/Claude/Windsurf Regels en n8n-workflowsIDE-regelZero-Secret lek gecontroleerd

TypeScript 5.8 Strenge modus, nul-alles en grensvalidatieregels

Declaratieve IDE-regel die strictNullChecks, noUncheckedIndexedAccess, gediscrimineerde vakbonden en runtime JSON-grensparsing afdwingt in TypeScript monorepos.

Declaratieve agent- en IDE-regelbestanden

---
description: TypeScript 5.8 strict type-safety, discriminated unions, and zero-any API boundaries
globs: **/*.{ts,tsx}
alwaysApply: true
---

# TypeScript 5.8 Strict Type-Safety Constitution

- Enable `"strict": true`, `"noUncheckedIndexedAccess": true`, and `"noImplicitOverride": true` in every `tsconfig.json`.
- NEVER use `any` or double-cast `as unknown as T`; type untrusted network/JSON inputs as `unknown` and narrow with explicit schema validators.
- Model async UI states and domain events as discriminated unions (`{ status: 'loading' } | { status: 'ok'; data: T } | { status: 'error'; message: string }`).
- Use `import type { ... }` for type-only imports so bundlers elide compile-time declarations deterministically.
- Enforce exhaustive `switch` checks using a `never` helper in `default` branches.

## Verification Check
```bash
npx tsc --noEmit --pretty false
```

Opmerkingen over de community-installatie en productierecensies (0)

Nog geen gemeenschapsnotities. Deel hieronder uw productieconfiguratietip.

Plaats een installatienotitie of verificatietip

Blootgestelde MCP Tools & Resource Schema Inspector

Tool-/bronidentificatieInvoerparametersUitvoeringsgedrag
forbid_explicit_any**/*.{ts,tsx}Replaces any and unsafe as casts with unknown + narrowed type guards.