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).
frontend ruleP2stack specificStack: typescript
typescripttsconfigconfiguration
Use a modern TypeScript target and bundler-friendly compiler options
Set target/lib to a recent ES version and use react-jsx so you don't import React in every file or carry legacy interop flags.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codejson
| 1 | { "target": "es5", "lib": ["esnext"], "jsx": "preserve", "esModuleInterop": true } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejson
| 1 | { "target": "es2022", "lib": ["es2022"], "jsx": "react-jsx", "module": "preserve" } |
Explanation (EN)
Objašnjenje (HR)