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
namingabstractiondesign-system
Allow abstraction-level names to differ from underlying design tokens
A prop's value set (e.g. Button color names) is an abstraction over the palette and need not exactly mirror token names.
PR: hegnar-zephr-components · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetypescript
| 1 | // insisting color prop values exactly match $grey-100/$grey-200 token names |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | color?: 'blue' | 'grey-light' | 'grey-very-light' | 'red'; // abstraction over palette |
Explanation (EN)
Objašnjenje (HR)