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).
frontend ruleP2universalStack: TypeScript
namingconstantsclarity
Name shared constants by their domain, not the feature that added them
Don't prefix a generic, reusable constant with one feature's name when the concept is broader (e.g. layout tabs aren't pinpoint-specific).
PR: hegnar-forum-web · org-mining-3rd-2026-06Created: Jun 18, 2026
Bad example
Old codets
| 1 | export const PINPOINT_TABS = ['markedsdata', 'nyheter', 'pinpoint']; // these are page-layout tabs |
Explanation (EN)
Objašnjenje (HR)
Good example
New codets
| 1 | export const PROFILE_TABS = ['markedsdata', 'nyheter', 'pinpoint']; |
Explanation (EN)
Objašnjenje (HR)