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: HTML
htmlformattingtoolingclean-code
Match the formatter; don't fight tooling over self-closing void tags
Browsers handle void elements like <meta> regardless of a trailing slash, so accept whatever the formatter (Prettier) produces instead of fighting it.
PR: hegnar-zephr-components · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codehtml
| 1 | <!-- manually 'fixing' this fights the formatter and breaks format:check --> |
| 2 | <meta name="viewport" content="width=device-width" /> |
Explanation (EN)
Objašnjenje (HR)
Good example
New codehtml
| 1 | <!-- leave it as the formatter writes it --> |
| 2 | <meta name="viewport" content="width=device-width"> |
Explanation (EN)
Objašnjenje (HR)