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 ruleP2universalStack: typescript
consistencyimportsconventions
Use a consistent import style across similar units
When several similar pieces of code can import a type/util two equivalent ways, pick one style and apply it consistently.
PR: hegnar-web · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetsx
| 1 | // some icons |
| 2 | const A = (p: React.SVGProps<SVGSVGElement>) => ...; |
| 3 | // others |
| 4 | import { SVGProps } from 'react'; |
| 5 | const B = (p: SVGProps<SVGSVGElement>) => ...; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | import { SVGProps } from 'react'; |
| 2 | const A = (p: SVGProps<SVGSVGElement>) => ...; |
| 3 | const B = (p: SVGProps<SVGSVGElement>) => ...; |
Explanation (EN)
Objašnjenje (HR)