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 ruleP0stack specificStack: react
reactlifecyclecorrectnessbug
Spell framework lifecycle method names exactly
A misspelled lifecycle method (e.g. componentWillUnMount) silently never runs; match the framework's exact casing.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codejavascript
| 1 | public componentWillUnMount(): void { |
| 2 | this.observer.unobserve(this.container); |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejavascript
| 1 | public componentWillUnmount(): void { |
| 2 | this.observer.unobserve(this.container); |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)