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 ruleP2universalStack: any
defaultsfeature-flagssafety
Default opt-in feature flags to false
A flag that enables a new/optional behavior should default to false so callers opt in explicitly rather than getting it implicitly.
PR: hegnar-forum-web · org-mining-3rd-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | function useFeature({ enabled = true } = {}) {} |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | function useFeature({ enabled = false } = {}) {} |
Explanation (EN)
Objašnjenje (HR)