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: javascript
readabilitystringsclean-codeutilities
Use a named helper for string casing instead of inline char surgery
Replace ad-hoc inline string slicing/casing with a clearly named utility (or lodash) so intent is obvious.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codetypescript
| 1 | const key = str.charAt(0).toLowerCase() + str.slice(1); |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | import { lowerFirst } from 'lodash'; |
| 2 | const key = lowerFirst(str); |
Explanation (EN)
Objašnjenje (HR)