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: universal
architecturereuseorganizationmodularity
Place reusable code in a shared location, not an app-specific folder
If a helper/component is generic, move it to a common directory and parameterize app-specific bits instead of leaving it under one app's namespace.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | // src/tvGuide/helper/url.ts |
| 2 | export function isSamePage(currentUrl: string, previousUrl: string): boolean { /* uses tvGuide base path */ } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | // src/common/helper/url.ts |
| 2 | export function isSamePage(basePath: string, currentUrl: string, previousUrl: string): boolean { /* generic */ } |
Explanation (EN)
Objašnjenje (HR)