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: node
package-jsondependenciesdevDependenciesbuild
Put test and build-only packages in devDependencies
Runtime dependencies belong in dependencies; tooling needed only to test or build (test runners, loaders) belongs in devDependencies to keep the production install lean.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codejson
| 1 | { "dependencies": { "jest": "^29", "css-loader": "^6", "express": "^4" } } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejson
| 1 | { |
| 2 | "dependencies": { "express": "^4" }, |
| 3 | "devDependencies": { "jest": "^29", "css-loader": "^6" } |
| 4 | } |
Explanation (EN)
Objašnjenje (HR)