Skip to content

angular/di-unused: does not work with arrow function declaration #443

@ojab

Description

@ojab

Consider the code:

angular.module("").factory("", ["$http", "$q", function($http, $q) {
    return $q.resolve();
}])

the correct warning 1:48 warning Unused injected value $http angular/di-unused is reported

But if function declaration will be changed to arrow function, i. e.:

angular.module("").factory("", ["$http", "$q", ($http, $q) => {
    return $q.resolve();
}])

no warning is emitted.

eslint-plugin-angular@1.6.1 and eslint@3.15.0 (with "es6": true) is used.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions