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 ruleP2stack specificStack: typescript
typescriptnamingconventionsnamespaces
Follow language conventions for namespace naming
Don't UPPERCASE a TypeScript namespace; use conventional casing, or a class of static methods if you want grouped static functions.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | export namespace TV_GUIDE_URL { |
| 2 | export function getHomeUrl(): string { /* ... */ } |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | export class TvGuideUrl { |
| 2 | static getHomeUrl(): string { /* ... */ } |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)