Appearance
herb:disable
Rule: herb-disable-comment-missing-rules
herb-disable-comment-missing-rules
Requires that <%# herb:disable %> comments specify either all or at least one specific rule name.
<%# herb:disable %>
all
A <%# herb:disable %> comment without any rule names serves no purpose and likely indicates an incomplete edit or mistake. The developer either:
herb:disable all
This rule ensures all <%# herb:disable %> comments are complete and functional.
<DIV class='value'>test</DIV> <%# herb:disable all %> <DIV>test</DIV> <%# herb:disable html-tag-name-lowercase %> <DIV class='value'>test</DIV> <%# herb:disable html-tag-name-lowercase, html-attribute-double-quotes %>
<div>test</div> <%# herb:disable %>`herb:disable` comment is missing rule names. Specify `all` or list specific rules to disable. (herb-disable-comment-missing-rules) <div>test</div> <%# herb:disable %>`herb:disable` comment is missing rule names. Specify `all` or list specific rules to disable. (herb-disable-comment-missing-rules)Remove extra whitespace before `%>`. (erb-no-extra-whitespace-inside-tags)
Add either all or specific rule names:
Option 1: Disable all rules
<DIV>test</DIV> <%# herb:disable all %>
Option 2: Disable specific rules
<DIV>test</DIV> <%# herb:disable html-tag-name-lowercase %>
Option 3: Remove the comment if it's not needed
<div>test</div>
-
Linter Rule: Require rule names in
herb:disablecomments Rule:
herb-disable-comment-missing-rulesDescription
Requires that
<%# herb:disable %>comments specify eitherallor at least one specific rule name.Rationale
A
<%# herb:disable %>comment without any rule names serves no purpose and likely indicates an incomplete edit or mistake. The developer either:herb:disable allbut forgot to addallThis rule ensures all
<%# herb:disable %>comments are complete and functional.Examples
✅ Good
🚫 Bad
Fix
Add either
allor specific rule names:Option 1: Disable all rules
Option 2: Disable specific rules
Option 3: Remove the comment if it's not needed
References
-