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).
fullstack ruleP2stack specificStack: Node
testingcitoolingvitest
Let test runners auto-detect CI single-run mode instead of forcing flags
Modern runners like Vitest switch to a single, compact run when CI=true; set that env var rather than fighting npm arg-passing with --run.
PR: hegnar-components · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codeyaml
| 1 | vitest: |
| 2 | run: npm run test --run # npm thinks --run is for npm, not vitest |
Explanation (EN)
Objašnjenje (HR)
Good example
New codeyaml
| 1 | vitest: |
| 2 | run: npm run test |
| 3 | env: |
| 4 | CI: true # vitest does a single compact run |
Explanation (EN)
Objašnjenje (HR)