Repository navigation
Disabling ignoring unused vars for _ prefix #1719
Description
Activity
Also, why do we have
vars: 'local'rather than the default'global'setting?I can submit a PR.
Though I am not sure about thevarssetting. Can't find a use case of having an unused global variable.If you could go through the git blame history for who added it and why, that could help. Or maybe there was no good reason at all.
Seems like there was no good reason.
It was there since custom eslint rules were added in the begining. See #27We probably took it here then. Would be nice to learn why Airbnb config specifies this.
Maybe @ljharb could say!
The default setting in eslint was
localat the time Airbnb set their config. Eslint later changed the default toall(global) and I'm guessing Airbnb never updated.Edit: For context this is why it changed from
localtoall@gaearon should the
varssetting be set to default?Yea.
see #1763
This setting certainly predates my involvement with the Airbnb config. I can't see any reason not to change it to "all" - can someone file an issue, or better, send a PR explaining the rationale?
@doshisid Do you mind following up with @ljharb and raising an issue in Airbnb ESLint config repo too?
Reacted by Jordan HarbandFixed by #1763.
Sure, I'll do it.
Reacted by Jordan Harband- locked and limited conversation to collaborators
on Jan 21, 2019
We currently ignore unused vars with
_prefix, mainly as a workaround for deleting extra properties in...restdestructuring. However #1705 is a proper fix for this, so I think we should remove the_rule in the next major bump. This would fix #1387.