EmmanuelDemey / EmmanuelDemey/eslint-plugin-angular
di-unused does not work for directive/component's controller
Open
Hacktoberfest
- Dominant language
- JavaScript
- Stars
- 620
- Forks
- 127
- PR merge metrics
- No merged PRs in 30d
Description
STR:
- Install `eslint` and `eslint-plugin-angular`
- create javascript file with
```
angular.module('app')
.component('foo', {
template: '
',
controller: function($log, $q) {
var $ctrl = this;
$ctrl.$q = $q;
}
})
```
controller: function($log, $q) {
var $ctrl = this;
$ctrl.$q = $q;
}
})
```
- Add `di-unused` rule to .eslintrc
ER: Lint should throw error about unused `$log`
AR: No error
Gist with stub project
https://gist.github.com/maksimr/ef6c3f25c94a56616577191ce878f9f1
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.