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: javascript
namingconventionsclean-codecasing
Avoid SHOUTING uppercase names for non-constant identifiers
Reserve all-caps names for true constants/enums; use normal casing for action types, reducer values, and similar identifiers when uppercase has no semantic meaning.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codejavascript
| 1 | const STANDARD = 'STANDARD'; |
| 2 | dispatch({ type: STANDARD }); |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejavascript
| 1 | const predefined = 'predefined'; |
| 2 | dispatch({ type: predefined }); |
Explanation (EN)
Objašnjenje (HR)