# vue/no-expose-after-await
disallow asynchronously registered
expose
- ⚙️ This rule is included in all of
"plugin:vue/vue3-essential"
,"plugin:vue/vue3-strongly-recommended"
and"plugin:vue/vue3-recommended"
.
# 📖 Rule Details
This rule reports usages of expose()
after an await
expression.
In the setup()
function, expose()
should be registered synchronously.
<script>
import { watch } from 'vue'
export default {
async setup(props, { expose }) {
/* ✓ GOOD */
expose({/* ... */})
await doSomething()
/* ✗ BAD */
expose({/* ... */})
}
}
</script>
# 🔧 Options
Nothing.
# 📚 Further Reading
# 🚀 Version
This rule was introduced in eslint-plugin-vue v8.1.0