Skip to content

useVueNextTickPromise

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:3:1 lint/nursery/useVueNextTickPromise ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Vue `nextTick` was called with a callback.

1 │ import { nextTick } from “vue”;
2 │
> 3 │ nextTick(() => {
^^^^^^^^^^^^^^^^
> 4 │ // …
> 5 │ });
^^
6 │

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>