-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
False positives + query ideas for variables with leading underscores. #655
Comments
I'm sure you're right, but could we have a reference for that convention? I'd also like to point out that in the examples you give you should be able to just omit the const [a, , c, d, e, f] = something |
Here are a few of places:
Ah yes! |
OK, thanks, that looks fairly widely accepted.
We could, but to be honest I doubt we'll lose any interesting results by enabling it for JS as well. |
js/unused-local-variable
has some false positives for variables that are intentionally unused, e.g. for array destructuring, etc...An example can be seen in Shopify/quilt#434
It's a convention that local variables with leading underscores are designed to be unread, e.g:
Moreover, tslint recently temporarily deprecated their no-unused-variable rule in favour of the new compiler flags which take leading underscores into account.
I suggest we:
js/unused-local-variable
The text was updated successfully, but these errors were encountered: