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

Support for defineModel #2130

Closed
Tracked by #2326
ota-meshi opened this issue Apr 8, 2023 · 3 comments · Fixed by #2360
Closed
Tracked by #2326

Support for defineModel #2130

ota-meshi opened this issue Apr 8, 2023 · 3 comments · Fixed by #2360

Comments

@ota-meshi
Copy link
Member

Tell us about your environment

  • ESLint version: v8.36.0
  • eslint-plugin-vue version: v9.10.0
  • Node version: v18.12.1

The problem you want to solve.

Add support for defineModel macro.

See https://github.com/vuejs/core/blob/main/CHANGELOG.md#330-alpha9-2023-04-08

Your take on the correct solution to problem.

Parser and some rules are affected. However, we have not yet listed the affected rules.
I think that, first, we need to list the rules affected by defineModel.

Additional context

Related to vuejs/vue-eslint-parser#186

@ota-meshi

This comment was marked as resolved.

@JoseGoncalves
Copy link

Since it's still an experimental feature, eslint-plugin-vue won't support it yet until it's GA.

https://blog.vuejs.org/posts/vue-3-3#experimental-features

It is now stable in Vue 3.4: https://blog.vuejs.org/posts/vue-3-4#definemodel-is-now-stable

@FloEdelmann
Copy link
Member

FloEdelmann commented Dec 30, 2023

Rules that need to be changed (feel free to edit and expand):

  • vue/define-macros-order
  • vue/no-unused-emit-declarations

LeSuisse pushed a commit to Enalean/tuleap that referenced this issue Jan 8, 2024
Vue 3.4 announcement: https://blog.vuejs.org/posts/vue-3-4

This allows us to use `defineModel` macro. This remove an eslint-disable
but introduce a new one 😒 since eslint needs to be updated upstream to
support defineModel. See following issue for details:
vuejs/eslint-plugin-vue#2130

Jest doesn't know defineModel either, therefore we take the opportunity to switch to vitest. One bird two stones 😅

See documentation about defineModel: https://vuejs.org/guide/components/v-model.html

No functional changes: in project » admin » permissions per group.

Part of request #31168: Migration Vue2 => Vue3

Change-Id: Idbd1a1519460391cc4438a951865415745ff2dd5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants