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 ruleP1universalStack: node
environmentconfigcouplingnode-env
Don't derive feature config from NODE_ENV; use dedicated env vars
Use purpose-specific environment variables for external integrations rather than coupling them to NODE_ENV.
PR: hegnar-web · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codejavascript
| 1 | const drpEnv = process.env.NODE_ENV === 'production' ? 'prod' : 'dev'; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejavascript
| 1 | const drpEnv = process.env.DRP_ENVIRONMENT; |
Explanation (EN)
Objašnjenje (HR)