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).
backend ruleP2universalStack: typescript
typesnamespacesnamingreadability
Group related types under a namespace and drop redundant name prefixes
Export a family of types inside a namespace so callers write Stripe.Product instead of repeating a StripeProduct prefix on every type.
PR: vinify-backend · org-mining-deep-2026-06Created: Jun 17, 2026
Bad example
Old codetypescript
| 1 | export type StripeProduct = ...; |
| 2 | export type StripeProductListParams = ...; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | export namespace Stripe { |
| 2 | export type Product = ...; |
| 3 | export type ProductListParams = ...; |
| 4 | } |
Explanation (EN)
Objašnjenje (HR)