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
configcorrectnessnaming
Use the config value that semantically matches its purpose
Don't reuse a config value (e.g. a static-assets domain) for an unrelated purpose just because it happens to hold a similar string; pick the value whose meaning matches the use.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | const canonical = `https://${config.app.staticDomain}/`; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | // staticDomain is for assets and may differ from the site domain |
| 2 | const canonical = `https://${config.app.domain}/`; |
Explanation (EN)
Objašnjenje (HR)