Vetur: Vue 2/3 Eslint rules

Created on 5 Jul 2020  路  3Comments  路  Source: vuejs/vetur

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?

feature-request eslint-plugin-vue

Most helpful comment

@ota-meshi How can I make vetur use [email protected]?

All 3 comments

Hi @octref.

[email protected] 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.
https://github.com/vuejs/eslint-plugin-vue/pull/1038

Let me know if you have any other help.

@ota-meshi How can I make vetur use [email protected]?

@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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Dealerpriest picture Dealerpriest  路  3Comments

LukeLin picture LukeLin  路  3Comments

gabrielboliveira picture gabrielboliveira  路  3Comments

yoyoys picture yoyoys  路  3Comments

octref picture octref  路  3Comments