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

Latest plugin isn't allow eslint override #2113

Closed
3 tasks done
wonbyte opened this issue Aug 4, 2020 · 18 comments
Closed
3 tasks done

Latest plugin isn't allow eslint override #2113

wonbyte opened this issue Aug 4, 2020 · 18 comments

Comments

@wonbyte
Copy link

wonbyte commented Aug 4, 2020

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: macOS 10.15.6
  • Vetur version: 0.26.0
  • VS Code version: 1.47.3

Problem

After updating the vetur plugin to the latest version today, I am now seeing eslint errors for
[vue/valid-v-slot]'v-slot' directive doesn't support any modifier.. When I try to turn this rule off following the docs here: https://vuejs.github.io/vetur/linting-error.html#linting it is not working.

Screen Shot 2020-08-04 at 5 05 37 PM

[vue/valid-v-slot]
'v-slot' directive doesn't support any modifier.

Reproducible Case

  1. Update to the latest vetur plugin.
  2. Open a file with a template slot that uses the dot modifier.
@octref
Copy link
Member

octref commented Aug 5, 2020

Are you using vue2 or vue3?
When you turn off Vetur's linting, you should set vetur.validation.template: false. Did you do that?

@wonbyte
Copy link
Author

wonbyte commented Aug 5, 2020

Vue 2. Turning off the vetur template validation does allow me to suppress the error. Any idea why it started after upgrading to the latest vetur plugin version? Did something change in the bundled eslint setup?

@yoyo930021
Copy link
Member

Vue 2. Turning off the vetur template validation does allow me to suppress the error. Any idea why it started after upgrading to the latest vetur plugin version? Did something change in the bundled eslint setup?

Follow up #2015.
We upgrade eslint-plugin-vue version to 7.0.0-beta.0 for vue 3 support.

@yoyo930021
Copy link
Member

yoyo930021 commented Aug 5, 2020

We will provide vue template validation with eslint-plugin-vue.
So it is not related to eslint config.
If you use eslint, set vetur.validation.template: false.

@wonbyte
Copy link
Author

wonbyte commented Aug 5, 2020

@yoyo930021 yep, I was able to turn off the vetur linting and use the eslint plugin for now. I assume once vue 3 is released that error should no longer appear when using vetur?

@yoyo930021
Copy link
Member

@yoyo930021 yep, I was able to turn off the vetur linting and use the eslint plugin for now. I assume once vue 3 is released that error should no longer appear when using vetur?

Can we add modifier in v-slot when vue 3?
I can't find related rfcs.

@mentAl-maZe
Copy link

mentAl-maZe commented Aug 5, 2020

@octref

Are you using vue2 or vue3?
When you turn off Vetur's linting, you should set vetur.validation.template: false. Did you do that?

If I turn off vetur.validation.template i get linting by eslint but i loose linting on interpolated typescript... is there a way to circumvent this?

@wonbyte
Copy link
Author

wonbyte commented Aug 6, 2020

@yoyo930021 yep, I was able to turn off the vetur linting and use the eslint plugin for now. I assume once vue 3 is released that error should no longer appear when using vetur?

Can we add modifier in v-slot when vue 3?

I can't find related rfcs.

Good question. Closest thing I've found is vuejs/core#1241 but I'm not sure what they finalized on....

@octref
Copy link
Member

octref commented Aug 6, 2020

@mentAl-maZe #1293. I'll fix that for the next release.

@haiarha
Copy link

haiarha commented Aug 6, 2020

For now, I disable latest extension and install v0.24.1:
https://marketplace.visualstudio.com/items?itemName=hikerpig.vetur

@yoyo930021
Copy link
Member

For now, I disable latest extension and install v0.24.1:
https://marketplace.visualstudio.com/items?itemName=hikerpig.vetur

You can set vetur.validation.template: false.

@haiarha
Copy link

haiarha commented Aug 6, 2020

@yoyo930021 But i need validation in the file 😭

@haiarha
Copy link

haiarha commented Aug 6, 2020

If I turn off vetur.validation.template i get linting by eslint but i loose linting on interpolated typescript... is there a way to circumvent this?

@mentAl-maZe For me this fork fits perfectly:

I disable latest extension and install v0.24.1:
https://marketplace.visualstudio.com/items?itemName=hikerpig.vetur

@mentAl-maZe
Copy link

@octref Thx 👍

@haiarha I'll wait for the next release to drop, in the meantime I'll just have to be a bit more careful about my variables 😅

@yoyo930021
Copy link
Member

The v0.26.1 is release.

@benwinding
Copy link

Well I can confirm that this is still an issue in vetur 0.31.3.

@yoyo930021
Copy link
Member

Well I can confirm that this is still an issue in vetur 0.31.3.

* `vetur.validation.template: false` in settings works, but you lose a lot of other error checking too

* It would be great to support this option here: https://eslint.vuejs.org/rules/valid-v-slot.html#options

* This fork of the extension works as expected https://marketplace.visualstudio.com/items?itemName=hikerpig.vetur

The vetur.validation.template: false option is only disable eslint built-in rule and template prop.
You don't lose a lot of other error checking.
https://vuejs.github.io/vetur/linting-error.html#linting

This built-in feature is only design in basic project.
The strong use of ESLint to replace this feature.

@garyo
Copy link

garyo commented Feb 2, 2021

Newbie question: where to set vetur.validation.template: false? I'm using emacs with vls on Linux (WSL). I have a .eslintrc.js but no vetur config files in my project. I tried creating vetur.config.js per https://vuejs.github.io/vetur/reference/#example but it seemed to have no effect on this error.

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

7 participants