eslint-plugin-vue
eslint-plugin-vue copied to clipboard
vue/html-indent Ignore the format of the comment content
What rule do you want to change? I want to be able to ignore error messages for commenting code
Does this change cause the rule to produce more or fewer warnings? fewer
How will the change be implemented? (New option, new default behavior, etc.)? default behavior
Please provide some example code that this change will affect:
<template>
<div class="app">
<ResizeObserver
v-for="i in 1"
:key="i"
v-slot="size"
>
<!-- <Icon-->
<!-- name="bi-alarm"-->
<!-- size="20"-->
<!-- color="red"-->
<!-- class="test1"-->
<!-- :class="['test2',{active:true}]"-->
<!-- style="font-weight:500"-->
<!-- :style="{background:'#eee'}"-->
<!-- @click="clickFn"-->
<!-- />-->
<Spin
type="dot"
size="20"
color="red"
class="test1"
:class="['test2',{active:true}]"
style="font-weight:500"
:style="{background:'#eee'}"
@click="clickFn"
/>
<div>
{{size}}
</div>
</ResizeObserver>
</div>
</template>
What does the rule currently do for this code? ESLint: Expected indentation of 3 tabs but found 0 tabs.(vue/html-indent)
What will the rule do after it's changed? No error message
Additional context
I think many formatting tools and ESLint core also indent comments, so I think that rule generally reports correct indentation violations. If you don't like that rule, you can turn it off.
@ota-meshi Can you add an option?
What are your suggested option? If someone implements your suggested option and opens a PR, we may merge.