Skip to content

useVueNextTickPromise (JavaScript)

Language JavaScript (and super languages)
biome.json
{
"linter": {
"rules": {
"nursery": {
"useVueNextTickPromise": "error"
}
}
}
}

Enforces Promise syntax when using Vue nextTick.

Vue nextTick returns a Promise when no callback is passed. Promise syntax composes better with await and keeps asynchronous control flow explicit.

<script>
import { nextTick } from "vue";
nextTick(() => {
// ...
});
</script>
code-block.vue:4:1 lint/nursery/useVueNextTickPromise ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ℹ Vue `nextTick` was called with a callback.

2 │ import { nextTick } from "vue";
3 │
> 4 │ nextTick(() => {
│ ^^^^^^^^^^^^^^^^
> 5 │ // ...
> 6 │ });
│ ^^
7 │ </script>
8 │

ℹ Promise syntax composes better with `await` and keeps asynchronous control flow explicit.

ℹ Call `nextTick` without a callback, then await it or chain `.then()` instead.

ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

<script>
import { nextTick } from "vue";
await nextTick();
// ...
</script>