Update vue/no-expose-after-await rule to support <script setup>#1885
Update vue/no-expose-after-await rule to support <script setup>#1885
vue/no-expose-after-await rule to support <script setup>#1885Conversation
FloEdelmann
left a comment
There was a problem hiding this comment.
Looks good, but very complicated 😲
I have two very minor suggestions.
Co-authored-by: Flo Edelmann <florian-edelmann@online.de>
Co-authored-by: Flo Edelmann <florian-edelmann@online.de>
|
Thank you for your review! I have merged your suggestions. |
FloEdelmann
left a comment
There was a problem hiding this comment.
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 vue@3.3.4, 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