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 ruleP2universalStack: typescript
namingconfigreadability
Name configuration maps for their role, not generically
Give lookup maps and config objects descriptive names (e.g. ApiBaseUrlMap) rather than ambiguous ones like Api.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codets
| 1 | export const Api = { |
| 2 | forum: 'https://forum.example.com', |
| 3 | ticker: 'https://ticker.example.com', |
| 4 | }; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codets
| 1 | export const ApiBaseUrlMap = { |
| 2 | forum: 'https://forum.example.com', |
| 3 | ticker: 'https://ticker.example.com', |
| 4 | }; |
Explanation (EN)
Objašnjenje (HR)