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 ruleP2universalStack: TypeScript
typescriptimportsconfigdeprecation
Prefer package.json subpath imports over deprecated baseUrl
tsconfig baseUrl is deprecated and slated for removal in TypeScript v7; configure subpath imports (the imports field) and use #/ prefixes instead.
PR: hegnar-forum-web · org-mining-3rd-2026-06Created: Jun 18, 2026
Bad example
Old codejson
| 1 | // tsconfig.json |
| 2 | { "compilerOptions": { "baseUrl": "./src" } } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejson
| 1 | // package.json |
| 2 | { "imports": { "#/*": "./src/*" } } |
| 3 | // import Comp from '#/components/Comp'; |
Explanation (EN)
Objašnjenje (HR)