Closed
Description
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:
const [a, _, c, d, e, f] = something
// or
const [a, _b, _c, d, e, f] = something
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:
- ignore variables that start with an underscore in
js/unused-local-variable
- create a new query that finds variables that suggests they should be unused, but are actually used.
Metadata
Metadata
Assignees
Labels
No labels