When you want to create a new promise, you should not use the $q.deferred anymore. Prefer the new syntax : $q(function(resolve, reject){})
Rule based on Angular 1.x
The following patterns are considered problems;
/*eslint angular/deferred: 2*/
// invalid
var deferred = $q.defer(); // error: You should not create a new promise with this syntax. Use the $q(function(resolve, reject) {}) syntax.
// invalid
var deferred = _$q_.defer(); // error: You should not create a new promise with this syntax. Use the $q(function(resolve, reject) {}) syntax.
The following patterns are not considered problems;
/*eslint angular/deferred: 2*/
// valid
$q(function() {
// ...
});
This rule was introduced in eslint-plugin-angular 0.1.0