in rules/di-unused.js [36:62]
function reportUnusedVariables(callee, fn) {
if (!fn) {
return;
}
visitedScopes.some(function(scope) {
if (scope.block !== fn) {
return;
}
if (scope.type === 'function-expression-name') {
return;
}
scope.variables.forEach(function(variable) {
if (variable.name === 'arguments') {
return;
}
if (fn.params.indexOf(variable.identifiers[0]) === -1) {
return;
}
if (variable.references.length === 0) {
context.report(fn, 'Unused injected value {{name}}', variable);
}
});
return true;
});
}