eslint-plugin-vue icon indicating copy to clipboard operation
eslint-plugin-vue copied to clipboard

vue/html-indent Ignore the format of the comment content

Open 1593292349 opened this issue 2 years ago • 3 comments

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

1

1593292349 avatar Sep 02 '22 07:09 1593292349

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 avatar Sep 05 '22 15:09 ota-meshi

@ota-meshi Can you add an option?

1593292349 avatar Sep 05 '22 15:09 1593292349

What are your suggested option? If someone implements your suggested option and opens a PR, we may merge.

ota-meshi avatar Sep 05 '22 15:09 ota-meshi