Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 849 Bytes

disabling-with-inline-comments.md

File metadata and controls

39 lines (28 loc) · 849 Bytes
id title
disable-rules-with-inline-comments
Disable rules with inline comments

Disable rules with inline comments.

To disable rule in a file, use HTML comments (<!-- ... -->) in the following format:

  • Disable all rules in an entire file:
<!-- eslint-disable -->
<div foo="foo" foo="foo"></div>
  • Disable or enable specific rules in an entire file:
<!-- eslint-disable @html-eslint/no-duplicate-attrs -->
<div foo="foo" foo="foo"></div>

<!-- eslint-enable @html-eslint/no-duplicate-attrs  -->
<div foo="foo" foo="foo"></div>
  • Disable all rules on a specific line:
<!-- eslint-disable-next-line -->
<div foo="foo" foo="foo"></div>
  • Disable a specific rule on a specific line:
<!-- eslint-disable-next-line @html-eslint/no-duplicate-attrs -->
<div foo="foo" foo="foo"></div>