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: react
consistencystyleconventions
Follow one function-declaration style consistently across similar exports
Match the established declaration style (e.g. arrow functions for all SVG/component exports) so similar modules look uniform.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codetsx
| 1 | export function MyIcon() { return <svg />; } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | export const MyIcon = () => <svg />; |
Explanation (EN)
Objašnjenje (HR)