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

New option for `next-tick-style`

Open fisker opened this issue 7 months ago • 4 comments

What rule do you want to change?

next-tick-style

Does this change cause the rule to produce more or fewer warnings?

No.

How will the change be implemented? (New option, new default behavior, etc.)?

If inside async function, provide autofix, otherwise no fix.

Please provide some example code that this change will affect:

<script setup>
const foo = () => {
	nextTick(() => {
	  // ...
	})
}
</script>

What does the rule currently do for this code?

Fixes my code to nextTick().then(...)

What will the rule do after it's changed?

Enforce await nextTick()

Additional context

I want the promise style use of nextTick(), but I don't want it fix to nextTick().then, I want await nextTick().

fisker avatar Jun 25 '24 19:06 fisker