We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5956eca commit 0b231daCopy full SHA for 0b231da
docs/rules/no-nesting.md
@@ -1 +1,30 @@
1
# Avoid nested `then()` or `catch()` statements (no-nesting)
2
+
3
+#### Valid
4
5
+```js
6
+myPromise
7
+ .then(doSomething)
8
+ .then(doSomethingElse)
9
+ .catch(errors)
10
+```
11
12
+#### Invalid
13
14
15
+myPromise.then(val => {
16
+ doSomething(val).then(doSomethingElse)
17
+})
18
19
20
+ doSomething(val).catch(errors)
21
22
23
+myPromise.catch(err => {
24
+ doSomething(err).then(doSomethingElse)
25
26
27
28
+ doSomething(err).catch(errors)
29
30
0 commit comments