Rules Hub
Coding Rules Library
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Document the preferred/current approach, not just the most prevalent one
When describing conventions, state the intended direction (preferred vs legacy), not merely what currently appears most often.
Bad example
| 1 | ## Styling |
| 2 | SCSS Modules are the primary styling method; Tailwind is used only for the header and footer. |
Explanation (EN)
Counting current usage misreports direction: if Tailwind is now the preferred approach and SCSS Modules are legacy, a doc that calls SCSS 'primary' steers new code the wrong way.
Objašnjenje (HR)
Brojanje trenutne upotrebe pogresno prikazuje smjer: ako je Tailwind sada preferirani pristup, a SCSS Modules su zastarjeli, dokument koji SCSS naziva 'primarnim' usmjerava novi kod u krivom smjeru.
Good example
| 1 | ## Styling |
| 2 | Tailwind is the preferred approach for new components. SCSS Modules are still widespread but are considered legacy and are being phased out. |
Explanation (EN)
Stating the preferred vs legacy status guides new work correctly even while the codebase is mid-migration, which is the information a contributor actually needs.
Objašnjenje (HR)
Navodjenje preferiranog naspram zastarjelog statusa ispravno usmjerava novi rad cak i dok je baza koda usred migracije, sto je informacija koja suradniku zapravo treba.
Notes (EN)
Pair the preferred approach with a one-line note on what the legacy path is, so readers maintaining old code aren't confused.
Bilješke (HR)
Uz preferirani pristup navedi i jednu recenicu o tome sto je zastarjeli put, kako citatelji koji odrzavaju stari kod ne bi bili zbunjeni.