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: react
reactpropsdead-codeclean-code
Don't pass props or classes that have no effect
Drop a passed className/prop when the receiving element already gets that styling internally; passing it from outside is dead code that misleads readers.
PR: hegnar-zephr-components · org-mining-2026-06Created: Jun 17, 2026
Bad example
Old codetsx
| 1 | <Modal className={styles.modal} /> |
| 2 | // Modal already applies styles.modal to its panel internally |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | <Modal /> |
Explanation (EN)
Objašnjenje (HR)