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).
frontend ruleP2project specificStack: typescript
organizationfile-structure
Place feature-specific files in feature-scoped subfolders
Group a feature's hooks, interfaces, and utilities under a feature-named subfolder rather than dumping them in the generic root of each directory.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codetext
| 1 | utils/hooks/useReportsQueryParam.ts |
| 2 | interfaces/ReportsQueryParam.ts |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetext
| 1 | utils/hooks/rapporter/useReportsQueryParam.ts |
| 2 | interfaces/rapporter/ReportsQueryParam.ts |
Explanation (EN)
Objašnjenje (HR)