Skip to content

Allow shadowing of same values ignored by no-unused-varsΒ #70

@glebec

Description

@glebec

Sometimes when you are forced to initialize a variable (e.g. object destructuring to get the "rest" of the props) you want to ignore that variable. Using _ as the variable name is a convention taken from other languages (where it is sometimes more than just a convention). However, _ variables can trigger the no-shadow rule if you have nested uses.

We should upgrade our no-shadow to use the allow prop as explained at https://eslint.org/docs/rules/no-shadow#allow. We should allow any variables that are ignored under no-unused-vars.

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