vue/valid-next-tick
eslint-plugin-vue
Safe autofixRecommended
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/valid-next-tick": "error",
},
},
];<script>
import { nextTick } from 'vue'
export default {
async mounted() {
nextTick() // missing await or callback
this.$nextTick // not invoked
this.$nextTick(a, b) // too many args
await this.$nextTick(callback) // both await and callback
}
}
</script><script>
import { nextTick } from 'vue'
export default {
async mounted() {
await nextTick()
this.$nextTick(callback)
this.$nextTick().then(callback)
}
}
</script>Examples from the Oxlint documentation.
vue/valid-next-tick
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/valid-next-tick": "error",
},
},
];vue/valid-next-tick
vue plugin · correctness
{
"plugins": [
"vue"
],
"rules": {
"vue/valid-next-tick": "error"
}
}nursery/useVueValidNextTick
nursery · since 2.6.5
{
"linter": {
"rules": {
"nursery": {
"useVueValidNextTick": "error"
}
}
}
}Enforce valid defineProps compiler macro
Disallow element's child contents which would be overwritten by a directive like v-html or v-text
Enforce valid defineOptions compiler macro
Disallow using deprecated $listeners (in Vue.js 3.0.0+)
Enforce valid defineEmits compiler macro
Disallow using deprecated $scopedSlots (in Vue.js 3.0.0+)