Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.27 KB

no-expose-after-await.md

File metadata and controls

54 lines (38 loc) · 1.27 KB
pageClass sidebarDepth title description since
rule-details
0
vue/no-expose-after-await
disallow asynchronously registered `expose`
v8.1.0

vue/no-expose-after-await

disallow asynchronously registered expose

📖 Rule Details

This rule reports the expose() after await expression.
In 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

🔍 Implementation