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: javascript
eventsnamingdomconvention
Use kebab-case for custom DOM event names
Name custom browser events in kebab-case (e.g. 'reply-discard') to follow the platform convention for event types.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codetypescript
| 1 | dispatchEvent(new CustomEvent('replyEditorDiscard')); |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | dispatchEvent(new CustomEvent('reply-editor-discard')); |
Explanation (EN)
Objašnjenje (HR)