Skip to content
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

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

Closed
jhoermann opened this issue Jul 15, 2022 · 0 comments · Fixed by #2244
Closed

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

jhoermann opened this issue Jul 15, 2022 · 0 comments · Fixed by #2244

Comments

@jhoermann
Copy link

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 jhoermann changed the title vue/no-setup-props-destructure should also warn when using toRefs vue/no-setup-props-destructure should also warn when using toRefs Jul 15, 2022
@jhoermann jhoermann changed the title vue/no-setup-props-destructure should also warn when using toRefs vue/no-setup-props-destructure should also warn when using toRefs Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants