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 ruleP2stack specificStack: typescript
reacttypespropsdecoupling
Give each component its own props interface
Don't share one props interface between two components even if currently identical; changing it for one would unintentionally change the other.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | // both horizontal and vertical use IDayPickerListProps |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | interface IDayPickerVerticalProps {...} |
| 2 | interface IDayPickerHorizontalProps {...} |
Explanation (EN)
Objašnjenje (HR)