# 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.

<template> <!-- ✓ GOOD --> <!-- comment --> <!-- comment comment --> <!-- comment --> <!-- ✗ BAD --> <!-- comment comment --> <!-- comment --> <!-- comment --> </template>
Now loading...

# 🔧 Options

{
  "vue/html-comment-indent": ["error", type]
}
  • type (number | "tab") ... The type of indentation. Default is 2. 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

<template> <!-- ✓ GOOD --> <!-- ✗ BAD --> </template>
Now loading...

# 4

<template> <!-- ✓ GOOD --> <!-- ✗ BAD --> </template>
Now loading...

# 0

<template> <!-- ✓ GOOD --> <!-- ✗ BAD --> </template>
Now loading...

# "tab"

<template> <!-- ✓ GOOD --> <!-- ✗ BAD --> </template>
Now loading...

# 🚀 Version

This rule was introduced in eslint-plugin-vue v7.0.0

# 🔍 Implementation

Last Updated: 12/24/2020, 2:51:18 AM