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).
workflow ruleP2stack specificStack: typescript
testingtypechecktscworkflow
A passing test run doesn't prove the code type-checks
Test runners (Vitest/Jest via esbuild/swc) transpile by stripping types without checking them, so a green test suite can hide type errors. Run the project's typecheck (tsc) separately before treating a change as done.
PR: Pre-PR review FCK-3150 (self-review findings)Created: Jul 10, 2026
Bad example
Old codets
| 1 | pnpm test # green -> assume the change is safe to push |
Explanation (EN)
Objašnjenje (HR)
Good example
New codets
| 1 | pnpm test && pnpm run typecheck # tsc actually validates the types |
Explanation (EN)
Objašnjenje (HR)
Notes (EN)
Especially relevant for pre-push/validate hooks that include tsc — don't rely on the test runner alone as a type-safety signal.