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).
Don't reuse a library's internal type-naming convention as your own domain vocabulary
When a dependency uses an implementation-detail suffix in its type names (e.g. schema-dts's `*Leaf`), don't adopt that word in your own comments/prose as if it were a shared domain term — it confuses readers unfamiliar with the library's internals.
Bad example
| 1 | // Is this leaf meant to be the same thing as our JSON-LD node? |
Explanation (EN)
"Leaf" here is only schema-dts's internal type-name suffix (`OrganizationLeaf`, `DatasetLeaf`); using it in team prose as if it were a domain concept conflates a library implementation detail with the team's own vocabulary.
Objašnjenje (HR)
"Leaf" je ovdje samo interni sufiks imena tipa u schema-dts (`OrganizationLeaf`, `DatasetLeaf`); koristenje toga u prozi tima kao da je domenski koncept mijesa detalj implementacije biblioteke s vlastitim rjecnikom tima.
Good example
| 1 | // The runtime object is a schema.org node; "Leaf" only refers to the imported schema-dts type name. |
Explanation (EN)
Reserve the library's naming convention for referring to its exported type names specifically, and use the team's own established term ("node") for the runtime concept.
Objašnjenje (HR)
Rezerviraj konvenciju imenovanja biblioteke za referenciranje specificno na njena izvezena imena tipova, i koristi vlastiti utvrdeni izraz tima ("node") za runtime koncept.