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).
fullstack ruleP2universalStack: typescript
namingextensibilityconfigtypes
Name config keys and types generically when more uses are coming
When a setting will gain siblings, choose a general container name/type (e.g. adminSettings) instead of one tied to the single current feature, so future additions don't force a rename.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | interface IStructure { |
| 2 | fundingChoice: boolean; |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | interface IStructure { |
| 2 | adminSettings: IAdminPanelConfig; // holds fundingChoice and future settings |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)