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 defineModels or any other customMacros #2289

Closed
LeonSnajdr opened this issue Sep 18, 2023 · 1 comment
Closed

Support for defineModels or any other customMacros #2289

LeonSnajdr opened this issue Sep 18, 2023 · 1 comment

Comments

@LeonSnajdr
Copy link

What rule do you want to change?
define-macros-order

Does this change cause the rule to produce more or fewer warnings?
more

How will the change be implemented? (New option, new default behavior, etc.)?
new entry in the order array

Please provide some example code that this change will affect:

old:

"vue/define-macros-order": [
      "error",
      {
        order: ["defineProps", "defineEmits"]
      }
    ],

new:

"vue/define-macros-order": [
      "error",
      {
        order: ["defineProps", "defineModels", "defineEmits"]
      }
    ],

What does the rule currently do for this code?
It throws the following error: Configuration for rule "vue/define-macros-order" is invalid: Value "defineModels" should be equal to one of the allowed values.

What will the rule do after it's changed?
Support DefineModels

Additional context
Maybe support all macros defined in parserOptions.vueFeatures.customMacros

@FloEdelmann
Copy link
Member

I think you mean defineModel (not defineModels). We have an issue for that:

But see the comment there:

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

@FloEdelmann FloEdelmann closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2023
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

No branches or pull requests

2 participants