Appearance
enforce unified line brake in HTML comments
--fix
This rule will enforce consistency of line break after the <!-- and before the --> of comment. It also provides several exceptions for various documentation styles.
<!--
-->
{ "vue/html-comment-content-newline": ["error", { "singleline": "always" | "never" | "ignore", "multiline": "always" | "never" | "ignore", }, { "exceptions": [] } ] }
The first option is either an object with "singleline" and "multiline" keys.
"singleline"
"multiline"
singleline
"never"
"always"
multiline
You can also set the same value for both singleline and multiline by specifies a string.
This rule can also take a 2nd option, an object with the following key: "exceptions".
"exceptions"
"vue/html-comment-content-newline": ["error", { ... }, { "exceptions": ["*"] }]
{"singleline": "always", "multiline": "ignore"}
{"singleline": "ignore", "multiline": "always"}
"always", { "exceptions": ["*"] }
This rule was introduced in eslint-plugin-vue v7.0.0
vue/html-comment-content-newline #
--fix
option on the command line can automatically fix some of the problems reported by this rule.📖 Rule Details #
This rule will enforce consistency of line break after the
<!--
and before the-->
of comment. It also provides several exceptions for various documentation styles.🔧 Options #
The first option is either an object with
"singleline"
and"multiline"
keys.singleline
... the configuration for single-line comments."never"
(default) ... disallow line breaks after the<!--
and before the-->
."always"
... require one line break after the<!--
and before the-->
.multiline
... the configuration for multiline comments."never"
... disallow line breaks after the<!--
and before the-->
."always"
(default) ... require one line break after the<!--
and before the-->
.You can also set the same value for both
singleline
andmultiline
by specifies a string.This rule can also take a 2nd option, an object with the following key:
"exceptions"
."exceptions"
value is an array of string patterns which are considered exceptions to the rule."always"
#"never"
#{"singleline": "always", "multiline": "ignore"}
#{"singleline": "ignore", "multiline": "always"}
#"always", { "exceptions": ["*"] }
#👫 Related Rules #
🚀 Version #
This rule was introduced in eslint-plugin-vue v7.0.0
🔍 Implementation #