-
-
Notifications
You must be signed in to change notification settings - Fork 664
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
Add support for props destructure #2121
Comments
Since it's still an experimental feature, eslint-plugin-vue won't support it yet until it's GA. |
It's stable now: https://blog.vuejs.org/posts/vue-3-5#reactive-props-destructure |
Perhaps a bit niche, but an optional rule that bans props destructure could also be useful, to keep consistency with existing code that doesn't use it. Or perhaps one that you can configure to either enforce that everything uses props destructure or that nothing does. |
I believe we have merged the necessary changes into the master branch so I will close this issue. |
Tell us about your environment
The problem you want to solve.
Add support for props destructure. It will be introduced in Vue 3.3.
Your take on the correct solution to problem.
I think we should at least change the rules in the following list.
vue/no-setup-props-reactivity-loss
rule.Destructuring assignment immediately after defineProps() is allowed.
Add support for props destructure to
vue/no-setup-props-reactivity-loss
rule #2550However, Vue2 doesn't allow to use props destructure, so we may need to split rules.vue/require-valid-default-prop
rule.Add support for props destructure to
vue/require-valid-default-prop
rule #2551vue/require-default-prop
rule.Add support for props destructure to
vue/require-default-prop
rule #2552vue/no-boolean-default
rule.We need to support a new way to specify defaults.
Add support for props destructure to
vue/no-boolean-default
rule #2553vue/no-required-prop-with-default
rule.Add support for props destructure to
vue/no-required-prop-with-default
rule #2560vue/no-restricted-props
rule.Add support for props destructure to
vue/no-restricted-props
rule #2562Additional context
vuejs/core#7986
The text was updated successfully, but these errors were encountered: