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: universal
readabilitymaintainabilitysingle-responsibility
Split oversized files into focused units
Break a file that has grown large and multi-purpose into smaller modules organized by responsibility.
PR: hegnar-mws · org-mining-2026-06Created: Jun 17, 2026
Bad example
Old codetypescript
| 1 | // mda.provider.ts — 365 lines: quotes, performance, winners/losers, |
| 2 | // caching, schema mapping all in one class |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | // quotes.provider.ts, performance.provider.ts, winners-losers.provider.ts |
| 2 | // each a focused class extending a shared base |
Explanation (EN)
Objašnjenje (HR)