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
organizationcleanupcohesion
Move a single-use helper next to its only consumer and delete the leftover file
If a helper file has one remaining function used by exactly one module, inline it there and remove the now-empty file.
PR: hegnar-ws · org-mining-2026-06Created: Jun 17, 2026
Bad example
Old codetypescript
| 1 | // articleSerializer.ts exports one fn, imported only by fullArticleSerializer.ts |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | // move the fn into fullArticleSerializer.ts and delete articleSerializer.ts |
Explanation (EN)
Objašnjenje (HR)