Reputation: 493
Im using <script setup>
in vue 3, but I get those warnings on my methods because I no longer need to return them.
Any idea why it gives me those warnings?
Upvotes: 2
Views: 1042
Reputation: 2781
This is 4 months later, but it may help someone else who has the same problem.
You didn't include what the warnings actually were, but I believe they were related to unused variables and functions (because graying out a identifier is how VS Code marks it as unused, and because I have had the same issue myself).
This is due to Vetur not supporting <script setup>
yet.
Volar is now the recommended VS Code extension for Vue (see this comment of Evan's and the docs). Vetur is now deprecated and will enter "End of Life by the end of 2023".
Upvotes: 7