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).
frontend ruleP2universalStack: TypeScript
typescriptconsistencynamingenums
Keep a consistent casing convention for enum and union members
Pick one casing style for enum/union string values and apply it consistently across the codebase rather than mixing camelCase and kebab-case.
PR: vinify-frontend · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetypescript
| 1 | // one file |
| 2 | type A = 'currentLocation' | 'tastingLocation'; |
| 3 | // another file |
| 4 | type B = 'current-location' | 'tasting-location'; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | // both files use the same convention |
| 2 | type A = 'currentLocation' | 'tastingLocation'; |
| 3 | type B = 'currentLocation' | 'tastingLocation'; |
Explanation (EN)
Objašnjenje (HR)