Appearance
enforce unified spacing in HTML comment. (ex. 🆗 <!-- comment -->, 🆖 <!--comment-->)
<!-- comment -->
<!--comment-->
"plugin:lodash-template/recommended-with-html"
"plugin:lodash-template/all"
--fix
This rule aims to enforce unified spacing in HTML comment.
<% /* eslint "lodash-template/html-comment-spacing": "error" */ %> <!-- ✓ GOOD --> <!-- comment --> <!-- ✗ BAD --> <!-- comment --> <!--comment-->
Default spacing is set to always
always
{ "lodash-template/html-comment-spacing": ["error", "always" | "never"] }
"always"
<% /* eslint "lodash-template/html-comment-spacing": ["error", "always"] */ %> <!-- ✓ GOOD --> <!-- comment --> <!-- ✗ BAD --> <!-- comment --> <!--comment-->
"never"
<% /* eslint "lodash-template/html-comment-spacing": ["error", "never"] */ %> <!--✓ GOOD--> <!--comment--> <!-- ✗ BAD --> <!-- comment -->
lodash-template/html-comment-spacing
"plugin:lodash-template/recommended-with-html"
and"plugin:lodash-template/all"
.--fix
option on the command line can automatically fix some of the problems reported by this rule.Rule Details
This rule aims to enforce unified spacing in HTML comment.
Options
Default spacing is set to
always
"always"
- Expect one space between comment and curly brackets. "never"
- Expect no spaces between comment and curly brackets. Implementation