vue/html-comment-content-newline
eslint-plugin-vue
Safe autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/html-comment-content-newline": "error",
},
},
]; <!-- singleline comment -->
<!-- multiline
comment -->
</template> <!-- singleline comment -->
<!-- singleline comment -->
</template> <!-- multiline
comment -->
</template> <!-- singleline comment -->
<!--
multiline
comment
-->
<!--
✗ BAD
-->
<!--
singleline comment
-->
<!-- multiline
comment -->
</template> <!-- singleline comment -->
<!-- multiline
comment -->
<!--
✗ BAD
-->
<!--
singleline comment
-->
<!--
multiline
comment
-->
</template><!--
multiline
comment
-->
<!--
multiline
comment
-->
<!-- singleline comment -->
<!--
singleline comment
-->
<!--
singleline comment
-->Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
vue/html-comment-content-newline
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/html-comment-content-newline": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Require or disallow spacing between function identifiers and their invocations in <template>
Enforce line breaks after each array element in <template>
Require the registered component name to match the imported component name
Enforce linebreaks after opening and before closing array brackets in <template>