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: React
typespropsapi-design
Model sizing config as numbers, formatting to the string form at the edge
Accept dimensions as numbers (or number[]) and format them into the string shape an API like Image.sizes expects, rather than threading raw strings.
PR: hegnar-forum-web · org-mining-3rd-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | imageSizes?: string; // '32px' |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | imageSizes?: number[]; // formatted into `sizes` string internally |
Explanation (EN)
Objašnjenje (HR)