Skip to content
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

Update for <script setup> syntax #3255

Closed
cimpok opened this issue Nov 26, 2021 · 3 comments
Closed

Update for <script setup> syntax #3255

cimpok opened this issue Nov 26, 2021 · 3 comments

Comments

@cimpok
Copy link

cimpok commented Nov 26, 2021

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 <script setup> syntax.

@jzymx50
Copy link

jzymx50 commented Dec 2, 2021

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

@danb4r
Copy link

danb4r commented Jan 23, 2022

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.

@yoyo930021
Copy link
Member

Duplicate of #2296

@yoyo930021 yoyo930021 marked this as a duplicate of #2296 Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants