Skip to content

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

Closed
@jhoermann

Description

@jhoermann

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions