You should prefer the factory() method instead of service()
Rule based on Angular 1.x
Styleguide Reference
The following patterns are considered problems;
/*eslint angular/no-service-method: 2*/
// invalid
angular.module('myModule').service('myService', function() {
// ...
}); // error: You should prefer the factory() method instead of service()
The following patterns are not considered problems;
/*eslint angular/no-service-method: 2*/
// valid
angular.module('myModule').factory('myService', function () {
// ...
});
// valid
angular.module('myModule').value('someValue', {
// ...
});
This rule was introduced in eslint-plugin-angular 0.1.0