我目前正在使用 JSHint 和 JSCS(javascript 代码样式检查器),但它们都无法检测到这种未使用的变量:
describe('XX', function () {
var XXunused;
beforeEach(inject(function ($injector) {
XXunused = $injector.get('XXunused');
}));
// XXunused is (as the name says) not used in any other way in this block.
});
有人知道可以自动标记这些变量的任何工具吗?