Pattern: Inconsistent HTML comment indent
Issue: -
This rule enforces a consistent indentation style in HTML comment (<!-- ... -->
). The default style is 2 spaces.
<template>
<!-- ✓ GOOD -->
<!--
comment
-->
<!--
comment
comment
-->
<!--
comment
-->
<!-- ✗ BAD -->
<!--
comment
comment
-->
<!--
comment
-->
<!--
comment
-->
</template>
{
"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.
<template>
<!--
✓ GOOD
-->
<!--
✗ BAD
-->
</template>
<template>
<!--
✓ GOOD
-->
<!--
✗ BAD
-->
</template>
<template>
<!--
✓ GOOD
-->
<!--
✗ BAD
-->
</template>
<template>
<!--
✓ GOOD
-->
<!--
✗ BAD
-->
</template>