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).
Avoid hardcoding tool/library version numbers in prose documentation
Reference tools by name in docs; only pin a version when the version itself is the point.
Bad example
| 1 | A Vite + React 19 + TypeScript library. Built with Node 24, pnpm, a Vite v8-beta fork; Biome for linting and Vitest v5 for tests. |
Explanation (EN)
Every version number here is a future inaccuracy. React, Vite, Node and pnpm all move, and the prose now lies the moment any of them is bumped, with nothing forcing an update.
Objašnjenje (HR)
Svaki broj verzije ovdje je buduca netocnost. React, Vite, Node i pnpm se svi mijenjaju, pa prozni tekst pocinje lagati cim se bilo koji od njih nadogradi, a nista ne tjera na azuriranje.
Good example
| 1 | A Vite + React + TypeScript library. Built with Node.js, pnpm, Vite; Biome for linting and Vitest for tests. |
Explanation (EN)
Naming the tools without versions stays accurate across upgrades. The version of record lives in package.json / lockfiles, which are the single source of truth.
Objašnjenje (HR)
Imenovanje alata bez verzija ostaje tocno kroz nadogradnje. Sluzbena verzija zivi u package.json / lockfileovima, koji su jedini izvor istine.
Exceptions / Tradeoffs (EN)
Pin a version when it genuinely matters, e.g. a migration guide, a known incompatibility, or a minimum required version that gates behaviour.
Iznimke / Tradeoffi (HR)
Navedi verziju kada stvarno ima znacaja, npr. u vodicu za migraciju, kod poznate nekompatibilnosti ili minimalne potrebne verzije koja uvjetuje ponasanje.