vetur
vetur copied to clipboard
Update for <script setup> syntax
Vetur gives a false 'xxxx' is declared but its value is never read Vetur(6133) pop-up warning on import statements when the components: { ... } declatarion is missing, but the component is used in the template directly, which is an allowed shortcut in the new
Personally, I recommend disabling the validation provided by Vetur and turning to use eslint
explicitly with eslint-plugin-vue
. I haven't tried myself, but from its documentation your case is supported. https://eslint.vuejs.org/user-guide/#does-not-work-well-with-script-setup
For the moment, I had to switch to Volar extension on VSCode. (edited: just saw it is the recommended extension for the moment as mentioned at the Vue3 official docs)
It is also worth to take a look at the VueDX extension.
Hope to turn back to Vetur straight away, as soon as it gets updated to support this new script setup syntax.
Duplicate of https://github.com/vuejs/vetur/issues/2296