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
namingfilesconsistencydiscoverability
Keep file names in sync with their primary export
A module's file name should match the function/component it exports; mismatched names make code harder to find and reason about.
PR: hegnar-forum-web · org-mining-2026-06Created: Jun 17, 2026
Bad example
Old codets
| 1 | // file: normalizeArrayParam.ts |
| 2 | export default function toArray(p) {} |
Explanation (EN)
Objašnjenje (HR)
Good example
New codets
| 1 | // file: normalizeArrayParam.ts |
| 2 | export default function normalizeArrayParam(p) {} |
Explanation (EN)
Objašnjenje (HR)