I don't think no-unused-vars
rule should check this case, because the variable is actually "used" in some case, only should not assign when it's a last use.
function foo(bar) {
bar = doSomething();
}
function foo(bar) {
bar = doSomething(bar);
}
function foo(bar) {
bar = doSomething(bar);
// ... do something else, but not using bar
}
function foo(bar) {
bar = doSomething(bar);
return bar;
}
function foo(bar) {
bar = doSomething(bar);
use(bar);
}
function foo(bar) {
function aInnerFunctionUsesBar() {
return bar;
}
bar = doSomething(bar);
// bar is not used but calling another function uses bar
aInnerFunctionUsesBar()
}
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too