eslint-plugin-angular
eslint-plugin-angular copied to clipboard
`no-run-logic`: allow assignment
The following (apparently a valid configuration according to Angular documentation on $http caching) is not valid with no-run-logic enabled
.run(function (
$http,
someCacheService
) {
$http.defaults.cache = someCacheService;
})
It should be allowed to assign (maybe optionally?)
Good point. I also think the rule no-run-logic is not exactly what the referenced rule by johnpapa says (https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y171).
You should write a service to configure your cache.
The AngularJS documentation is full of bad practices.