Declarative .mdcCursor/Claude/Windsurf 규칙 및 n8n 워크플로IDE 규칙제로 비밀 유출 감사
TypeScript 5.8 엄격 모드, Zero-Any 및 경계 검증 규칙
strictNullChecks, noUncheckedIndexedAccess, 구별된 공용체 및 TypeScript 모노레포에서 런타임 JSON 경계 구문 분석을 시행하는 선언적 IDE 규칙입니다.
선언적 에이전트 및 IDE 규칙 파일
---
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
```커뮤니티 설정 참고 사항 및 제작 리뷰 (0)
아직 커뮤니티 메모가 없습니다. 아래에서 프로덕션 구성 팁을 공유하세요.
노출된 MCP 도구 및 리소스 스키마 검사기
| 도구/자원 식별자 | 입력 매개변수 | 실행 동작 |
|---|---|---|
| forbid_explicit_any | **/*.{ts,tsx} | Replaces any and unsafe as casts with unknown + narrowed type guards. |