Skip to content

Enforcing props destructuring #2688

Closed
@Ericlm

Description

@Ericlm

Please describe what the rule should do:
The role of this rule would be to suggest props destructuring. It could also warns on its usage if necessary.

What category should the rule belong to?

[X] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

// vue/prefer-props-destructuring

const props = defineProps<>({...}) // 🚨

const {...} = defineProps<>({...}) // 👍

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions