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 ruleP1universalStack: architecture
architectureduplicationpropsrequest-state
Do not run two parallel signals for the same concern; consolidate on the more capable one
When a new mechanism (request-scoped flag) overlaps an older one (a prop threaded through pages), plan to collapse the weaker onto the stronger instead of leaving components with two independent off-switches of different reach.
PR: hegnar-web#4698 FCK-3550 Drive ad suppression from the article flagCreated: Sep 7, 2026
Bad example
Old codets
| 1 | <Skyscrapers showAds={false} /> // prop, only silences slots |
| 2 | res.locals.adFree = true; // flag, drops head + body too |
Explanation (EN)
Objašnjenje (HR)
Good example
New codets
| 1 | // pages that passed showAds={false} set res.locals.adFree in their route; |
| 2 | // the prop is deleted from FaPage/KapitalPage/Skyscrapers |
Explanation (EN)
Objašnjenje (HR)