Rules Hub
Coding Rules Library
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Respect word boundaries in compound camelCase identifiers
Capitalize the boundary in compound names (insRefs, not insrefs) so multi-word identifiers stay readable and consistent.
Bad example
| 1 | export interface ListState { |
| 2 | insrefs: string[]; |
| 3 | } |
Explanation (EN)
'insrefs' runs two words together as a lowercase blob, hiding the word boundary and reading inconsistently next to other camelCase names.
Objašnjenje (HR)
'insrefs' spaja dvije rijeci u jednu malim slovima, skrivajuci granicu rijeci i citajuci se nedosljedno uz druge camelCase nazive.
Good example
| 1 | export interface ListState { |
| 2 | insRefs: string[]; |
| 3 | } |
Explanation (EN)
Capitalizing the second word's first letter marks the boundary, making the compound name scannable and consistent with camelCase conventions.
Objašnjenje (HR)
Pisanje prvog slova druge rijeci velikim slovom oznacava granicu, cineci slozeni naziv preglednim i dosljednim camelCase konvencijama.
Exceptions / Tradeoffs (EN)
Well-known all-lowercase domain terms or external API field names that must match a wire format should be kept verbatim.
Iznimke / Tradeoffi (HR)
Dobro poznate domenske rijeci pisane malim slovima ili nazivi polja vanjskog API-ja koji moraju odgovarati formatu na zici trebaju ostati doslovno isti.