eslint-plugin-vue icon indicating copy to clipboard operation
eslint-plugin-vue copied to clipboard

`vue/no-setup-props-destructure` should also warn when using `toRefs`

Open jhoermann opened this issue 2 years ago • 0 comments

What rule do you want to change? vue/no-setup-props-destructure

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 default behavior.

Please provide some example code that this change will affect:

const foo = toRefs(props.foo)

What does the rule currently do for this code? No error / warning.

What will the rule do after it's changed? Display error / warning.

Additional context Looks like the pattern above makes the variable reactive - but it looses reactivity instead.

jhoermann avatar Jul 15 '22 08:07 jhoermann