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 ruleP1universalStack: Node
citoolingpublishingquality-gate
Run a single validate gate (lint, format, types, tests) before publishing
Add one validate task that lints, checks formatting, typechecks, and runs tests, and wire it into prepublishOnly so bad releases can't be published.
PR: hegnar-components · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codejson
| 1 | "scripts": { |
| 2 | "prepublishOnly": "npm run build" |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejson
| 1 | "scripts": { |
| 2 | "validate": "npm run lint && npm run format:check && npm run typecheck && npm test", |
| 3 | "prepublishOnly": "npm run validate && npm run build" |
| 4 | } |
Explanation (EN)
Objašnjenje (HR)