Skip to content

prefer-destructuring rule triggers when mutating let binding #1705

@abonander

Description

@abonander

When you have the following:

let foo;
// ...
foo = bar.foo;

The prefer-destructuring rule triggers on the last line even though there's no way to actually mutate a let binding with destructuring ({ foo } = bar; is a syntax error).

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