-
-
Notifications
You must be signed in to change notification settings - Fork 668
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
fix: support multiple macro calls in vue/define-macros-order #2386
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -238,6 +238,22 @@ tester.run('define-macros-order', rule, { | |
parser: require.resolve('@typescript-eslint/parser') | ||
} | ||
} | ||
}, | ||
{ | ||
filename: 'test.vue', | ||
code: ` | ||
<script setup> | ||
const first = defineModel('first') | ||
const second = defineModel('second') | ||
|
||
const slots = defineSlots() | ||
</script> | ||
`, | ||
options: [ | ||
{ | ||
order: ['defineModel', 'defineSlots'] | ||
} | ||
] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for this PR! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a couple I could think of. Also one that tests that order of occurrence is maintained and not re-ordered like I suggested in the initial issue Can you think of any other interesting cases to check? |
||
} | ||
], | ||
invalid: [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can't be undefined, since you are using
??
above.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch ;)