vue/no-expose-after-await
eslint-plugin-vue
No autofixRecommended
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-expose-after-await": "error",
},
},
];<script setup>
await doSomething()
defineExpose({ /* ... */ }) // error
</script><script setup>
defineExpose({ /* ... */ }) // ok
await doSomething()
</script>Examples from the Oxlint documentation.
vue/no-expose-after-await
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-expose-after-await": "error",
},
},
];vue/no-expose-after-await
vue plugin · correctness
{
"plugins": [
"vue"
],
"rules": {
"vue/no-expose-after-await": "error"
}
}nursery/noVueExposeAfterAwait
nursery · since 2.6.7
{
"linter": {
"rules": {
"nursery": {
"noVueExposeAfterAwait": "error"
}
}
}
}Disallow export in <script setup>
Disallow asynchronously registered lifecycle hooks
Disallow using deprecated Vue.config.keyCodes (in Vue.js 3.0.0+)
Disallow deprecated this access in props default function (in Vue.js 3.0.0+)