Specify a consistent function style for componentsJS-0547
angularjs
Anonymous or named functions inside AngularJS components. The first parameter sets which type of function is required and can be 'named' or 'anonymous'. The second parameter is an optional list of angular object names.
Rule based on Angular 1.x
Bad Practice
// invalid
angular.module('myModule').factory('myService', myServiceFn);
function myServiceFn() {
// ...
} // error: Use anonymous functions instead of named function
Recommended
// valid
angular.module('myModule').factory('myService', function () {
// ...
});