Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
fullstack ruleP2stack specificStack: TypeScript
typescripttsconfig
Keep tsconfig target and lib in sync
The ECMAScript version in `target` and the matching `lib` entry should reference the same edition to avoid mismatched runtime/type assumptions.
PR: hegnar-forum-web · org-mining-3rd-2026-06Created: Jun 18, 2026
Bad example
Old codejson
| 1 | { |
| 2 | "compilerOptions": { |
| 3 | "target": "es2022", |
| 4 | "lib": ["dom", "es2025"] |
| 5 | } |
| 6 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejson
| 1 | { |
| 2 | "compilerOptions": { |
| 3 | "target": "es2025", |
| 4 | "lib": ["dom", "es2025"] |
| 5 | } |
| 6 | } |
Explanation (EN)
Objašnjenje (HR)