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: any
structureimportsfile-organization
Place a file in the directory its import path implies
Keep files where their import path indicates so imports like './SortDropdownTrigger' resolve to a correctly located file.
PR: hegnar-forum-web · org-mining-3rd-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | import SortDropdownTrigger from './SortDropdownTrigger'; // file actually elsewhere |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | // move the file next to its importer so the relative path is correct |
Explanation (EN)
Objašnjenje (HR)