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 ruleP2stack specificStack: React
reactcontextnaming
Keep provider and context names aligned
Name a context provider consistently with its context so consumers can tell what it provides.
PR: vinify-frontend · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetypescript
| 1 | export const CurrentVintageLocationContext = createContext(null); |
| 2 | export const LocationProvider = ({ children }) => { /* ... */ }; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | export const CurrentVintageLocationContext = createContext(null); |
| 2 | export const CurrentVintageLocationProvider = ({ children }) => { /* ... */ }; |
Explanation (EN)
Objašnjenje (HR)