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

Vue 2/3 Eslint rules #2015

Closed
octref opened this issue Jul 5, 2020 · 3 comments
Closed

Vue 2/3 Eslint rules #2015

octref opened this issue Jul 5, 2020 · 3 comments

Comments

@octref
Copy link
Member

octref commented Jul 5, 2020

Currently, if you start a project with Vue 3 and is using multi-root elements:

image

I'm planning to turn automatic template validation based on eslint off, so this wouldn't mislead users.

In the long term, I hope there could be 2 eslint rulesets, one for Vue 2 and one for Vue 3. Depending on the vue dependency version in package.json, choose which one to load.

@ota-meshi it seems you are doing a lot of work for the eslint-vue plugin. Would you be able to help creating the rulesets, or tell me which rules I should/shouldn't load for Vue 3?

@ota-meshi
Copy link
Member

Hi @octref.

eslint-plugin-vue@v7.0.0-alpha.x has started support for Vue.js 3.x.
This version adds three rulesets for Vue.js 3.x.

The following existing rulesets have been changed for use with Vue.js 2.x for compatibility.

Every ruleset contains vue/valid-template-root, but it has been changed to not report on multiple roots.
vuejs/eslint-plugin-vue#1038

Let me know if you have any other help.

@FrankFang
Copy link

@ota-meshi How can I make vetur use eslint-plugin-vue@v7.0.0-alpha.x?

@octref
Copy link
Member Author

octref commented Jul 29, 2020

@ota-meshi Great work. I have made the bundled eslint engine to load different rulesets depending on Vue version.

@FrankFang Detailed steps are in https://vuejs.github.io/vetur/linting-error.html

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

3 participants