Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork688
Addvue/valid-define-options
tovue3-essential
config#2653
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
lib/rules/valid-define-options.js Outdated
// TODO Switch in the next major version | ||
// categories: ['vue3-essential', 'vue2-essential'], | ||
categories: undefined, | ||
categories: ['vue3-essential', 'vue2-essential'], |
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.
IsdefineOptions
even supported in Vue 2? If not, then it makes no sense to add this rule to thevue2-essentials
config.
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.
It can only be used in<script setup>
syntax. Removed ✅
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.
Vue 2.7 added support for<script setup>
(seehttps://blog.vuejs.org/posts/vue-2-7-naruto), but I thinkdefineOptions
was added later to Vue 3 and never backported to Vue 2.
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.
Oh, I'm not very familiar with Vue 2.7, I'll check whetherdefineOptions
was introduced in Vue 2.7.
Sincevue/valid-define-emits
andvue/valid-define-props
are in theessential
category for both Vue 2 and Vue 3.
Update: Yep, you're right,defineOptions
was never added back to Vue 2. So, setting the category asvue3-essential
should be enough.
vue/valid-define-options
tovue3-essential
configThere 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.
Looks good to me 🙂
43d6a91
intovuejs:v10Uh oh!
There was an error while loading.Please reload this page.
Resolve the remaining todo in the code base.
Will added to#2166.