EmmanuelDemey / eslint-plugin-angular

ESLint plugin for AngularJS applications
https://www.npmjs.com/package/eslint-plugin-angular
618 stars 131 forks source link

di-order rule not working ! #565

Closed anubhavsinha98 closed 5 years ago

anubhavsinha98 commented 5 years ago
hey.thing("ThingName", [
"$http", "$scope", function($scope, $http) {

}
]);

Expected Behaviour: The above code should throw an error of di-order check. Observed Behaviour: It's not throwing any error.

EmmanuelDemey commented 5 years ago

Hi,

The di-order only check if the parameters are sorted.

For your issue, your should use the rule di.

You should have a look to this unit test. I think it is exactly the same snippet as yours.

https://github.com/EmmanuelDemey/eslint-plugin-angular/blob/master/test/di.js#L118