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

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

Open
glebec opened this issue Nov 30, 2018 · 0 comments
Open

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

glebec opened this issue Nov 30, 2018 · 0 comments

Comments

@glebec
Copy link
Member

glebec commented Nov 30, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant