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/React
yagniflagssimplicity
Don't add config params for features you don't render yet
Skip parameters/flags (e.g. enableDownvotes) guarding behavior that can't be triggered because the UI for it isn't rendered; they add complexity without value.
PR: hegnar-forum-web · org-mining-3rd-2026-06Created: Jun 18, 2026
Bad example
Old codets
| 1 | useVoteToggle({ postId, enableDownvotes = false }); // downvote button not rendered |
Explanation (EN)
Objašnjenje (HR)
Good example
New codets
| 1 | useVoteToggle({ postId }); // add the flag when downvoting actually ships |
Explanation (EN)
Objašnjenje (HR)