JS.VUE.HTML.COMMENT.INDENT
Enforce consistent indentation in HTML comments
Rule Details
This rule enforces a consistent indentation style in HTML comment (<!-- ... -->). The default style is 2 spaces.
{'vue/html-comment-indent': ['error']}
コピー
<template>
<!-- GOOD -->
<!--
comment
-->
<!--
comment
comment
-->
<!--
comment
-->
<!-- BAD -->
<!--
comment
comment
-->
<!--
comment
-->
<!--
comment
-->
</template>
Options
コピー
{
"vue/html-comment-indent": ["error", type]
}
type(number | "tab") ... The type of indentation. Default is2. If this is a number, it's the number of spaces for one indent. If this is"tab", it uses one tab for one indent.
2
{'vue/html-comment-indent': ['error', 2]}
コピー
<template>
<!--
GOOD
-->
<!--
BAD
-->
</template>
4
{'vue/html-comment-indent': ['error', 4]}
コピー
<template>
<!--
GOOD
-->
<!--
BAD
-->
</template>
0
{'vue/html-comment-indent': ['error', 0]}
コピー
<template>
<!--
GOOD
-->
<!--
BAD
-->
</template>
"tab"
{'vue/html-comment-indent': ['error', 'tab']}
コピー
<template>
<!--
GOOD
-->
<!--
BAD
-->
</template>