Currently utilizing JSHint and JSCS for JavaScript code validation, but neither of them can identify the presence of unused variables like in this example:
describe('XX', function () {
var XXunused;
beforeEach(inject(function ($injector) {
XXunused = $injector.get('XXunused');
}));
// XXunused variable is not utilized elsewhere in this block.
});
Does anyone have a recommendation for a tool that can automatically detect these types of unused variables?