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 ruleP1stack specificStack: TypeScript
typescripttsconfigtooling
Declare needed @types packages explicitly in tsconfig types
Newer TypeScript no longer auto-includes every installed @types package; list each one (e.g. node, vitest/globals) in compilerOptions.types.
PR: hegnar-forum-web · org-mining-3rd-2026-06Created: Jun 18, 2026
Bad example
Old codejson
| 1 | { |
| 2 | "compilerOptions": { |
| 3 | "types": ["vitest/globals"] |
| 4 | } |
| 5 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejson
| 1 | { |
| 2 | "compilerOptions": { |
| 3 | "types": ["node", "vitest/globals"] |
| 4 | } |
| 5 | } |
Explanation (EN)
Objašnjenje (HR)