-
-
Notifications
You must be signed in to change notification settings - Fork 681
Update vue/no-expose-after-await
rule to support <script setup>
#1885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but very complicated 😲
I have two very minor suggestions.
Co-authored-by: Flo Edelmann <[email protected]>
Co-authored-by: Flo Edelmann <[email protected]>
Thank you for your review! I have merged your suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks for fixing the other rules, too :)
Could a similar change be applied to |
Sounds like a valid improvement. Could you please open an issue for that? And maybe you'd like to implement that change? It should be quite similar to this PR. |
No. Since the changes in Vue 3.2, there is no problem in doing it after await in script setup. |
@FloEdelmann Added #2291 @ota-meshi I'm using [email protected], but I still get the console warning |
You can check it on SFC Playground. You can see that the compilation result of ;(
([__temp,__restore] = _withAsyncContext(() => doSomething())),
await __temp,
__restore()
)
SFC Playground: |
Note that your own implementation of |
Ok, that's interesting. The warning I saw must be caused by something else then. Thank you for the explanation! |
close #1872