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 ruleP1project specificStack: TypeScript
consistencyconfigurationmaintainabilityduplication
Mirror changes between paired desktop and mobile config files
When constants or config are split into desktop and mobile variants, any change to one must be reflected in the other to avoid divergence bugs.
PR: hegnar-zephr-components · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetypescript
| 1 | // desktopConsts.ts updated with a new item |
| 2 | // mobileConsts.ts left unchanged -> drift |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | // update both, or better, derive both from a single shared source |
| 2 | export const ITEMS = [/* ... */]; |
Explanation (EN)
Objašnjenje (HR)