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: TypeScript
configurationenvironmentsmaintainability
Make environment-dependent values config-driven, not hardcoded to prod
URLs, IDs, and namespaces that differ per environment should come from config keyed by the current environment instead of a hardcoded production string.
PR: hegnar-ws · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | 'xmlns:author': 'https://ws.finansavisen.no/rss-schemas/author', // always prod |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | 'xmlns:author': `${AppConfig.configuration.backendUrlPrefix}/rss-schemas/author`, |
Explanation (EN)
Objašnjenje (HR)