Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 880 Bytes

no-html-comments.md

File metadata and controls

26 lines (16 loc) · 880 Bytes

no-html-comments

✅ The extends: 'recommended' property in a configuration file enables this rule.

🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

HTML comments in your templates will get compiled and rendered into the DOM at runtime. This is undesirable in a production environment. Instead, you can annotate your templates using Handlebars comments, which will be stripped out when the template is compiled and have no effect at runtime.

Examples

This rule forbids the following:

<!-- comment goes here -->

This rule allows the following:

{{!-- comment goes here --}}

References