2

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? enter image description here

enter image description here

1

1 Answer 1

6

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".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.