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).
backend ruleP2universalStack: Node.js / npm
dependenciespackage-jsontooling
Put type-only packages in devDependencies
@types/* and other build/test-only packages belong under devDependencies, not dependencies, since they are not needed at runtime.
PR: hegnar-user-ws · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codejson
| 1 | "dependencies": { |
| 2 | "@types/lodash": "^4.14.198" |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejson
| 1 | "devDependencies": { |
| 2 | "@types/lodash": "^4.14.198" |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)