EmmanuelDemey / EmmanuelDemey/eslint-plugin-angular

[Rule] Detect the use of .then(function(){}, function(){})

Open
#227 1 comment 0 reactions 0 assignees View on GitHub
Rule
Dominant language
JavaScript
Stars
620
Forks
127
PR merge metrics
No merged PRs in 30d

Description

When using promise, we often use the `then` method with two parameters : one for success and one for error. Some guidelines explain that we should avoid the use of this signature, and use the `catch` method.

``` javascript
//bad
$http(...).then(
function(){},
function(){},
)

//good
$http(...)
.then(function(){})
.catch(function(){})
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.