EmmanuelDemey / EmmanuelDemey/eslint-plugin-angular
di, di-order and di-unused don't work with modules in variables
- Dominant language
- JavaScript
- Stars
- 620
- Forks
- 127
- PR merge metrics
- No merged PRs in 30d
Description
The following syntax produces errors as expected:
```
angular.module('MyModule').controller('MyCtrl', function(Zulu, Alpha, Bravo) {
Bravo.something();
});
```
Throws
- di: use array syntax
- di-order: injected dependecies should be in alphabetical order
- di-unused: Zulu and Alpha unused
But the following code passes fine:
```
(function(ngModule) {
ngModule.controller('MyCtrl', function(Zulu, Alpha, Bravo) {
Bravo.something();
});
})(angular.module('MyModule'));
```
I would expect both pieces of code to throw the same error.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.