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

feat: vue2 support #351

Merged
merged 2 commits into from Dec 7, 2023
Merged

feat: vue2 support #351

merged 2 commits into from Dec 7, 2023

Conversation

GerryWilko
Copy link
Contributor

Description

This PR aims to provide support for Vue 2. The current eslint rules are based off the Vue 3 eslint rules, this PR introduces a new configuration option vue2 that when passed to the vue config will instead base the rules off the Vue 2 eslint rules.

Some of the eslint rules in the Vue 3 rulesets will introduce changes which are incompatible with Vue 2 projects. For example named v-models rather that prop.sync.

Linked Issues

Additional context

@Dimava
Copy link
Contributor

Dimava commented Dec 7, 2023

🤔
Vue 2 is reaching EOL in three weeks, so I'm not sure about how useful could this be
If there is auditory for this it may be useful, but I somewhat doubt many will move from antfu-eslint@0.x or other preset without planning to drop in Vue3

@GerryWilko
Copy link
Contributor Author

I understand this may be a bit late to the party however I do feel Vue 2 support even if just on the basis of the base rules being swapped will be helpful to a large number of people.

Some members of the core Vue team are also offering extended support (paid) for Vue 2 beyond EOL.

My team are in the process of migrating a large Vue 2 app to Vue 3 but I would like to apply these eslint rules in the meantime.

I did also pop a question over to @antfu on discord before starting and he seemed open to a PR adding support.

@antfu antfu merged commit b1a37f9 into antfu:main Dec 7, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants