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: React
reactnamingimportsclarity
Rename local components to avoid clashing with library names
Don't name a local component the same as a widely-used library export (e.g. FormControl); pick a distinct name to prevent import confusion.
PR: vinify-frontend · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetsx
| 1 | // local component named FormControl shadows MUI's FormControl |
| 2 | export const FormControl = () => {}; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | export const SettingsFormControl = () => {}; |
Explanation (EN)
Objašnjenje (HR)