Closed heggria closed 2 months ago
What rule do you want to change?
no-setup-props-reactivity-loss
Does this change cause the rule to produce more or fewer warnings?
fewer
How will the change be implemented? (New option, new default behavior, etc.)?
In vue 3.5, variables destructured from props will retain reactivity, so this warning is incorrect in this context.
Please provide some example code that this change will affect:
Playground
// before: warning "Destructuring the `props` will cause the value to lose reactivity." const { name, className = '', height = '14', width = '14' } = defineProps<{ name: string className?: string height?: string | number width?: string | number }>() // after: no warning in vue 3.5 const { name, className = '', height = '14', width = '14' } = defineProps<{ name: string className?: string height?: string | number width?: string | number }>()
https://github.com/vuejs/eslint-plugin-vue/issues/2121
Thanks for linking that issue! I'll close this as a duplicate then.
What rule do you want to change?
no-setup-props-reactivity-loss
Does this change cause the rule to produce more or fewer warnings?
fewer
How will the change be implemented? (New option, new default behavior, etc.)?
In vue 3.5, variables destructured from props will retain reactivity, so this warning is incorrect in this context.
Please provide some example code that this change will affect:
Playground