@@ -20,8 +20,7 @@ ruleTester.run('catch-or-return', rule, {
20
20
21
21
// arrow function use case
22
22
{
23
- code :
24
- 'postJSON("/smajobber/api/reportJob.json")\n\t.then(()=>this.setState())\n\t.catch(()=>this.setState())' ,
23
+ code : 'postJSON("/smajobber/api/reportJob.json")\n\t.then(()=>this.setState())\n\t.catch(()=>this.setState())' ,
25
24
parserOptions : { ecmaVersion : 6 } ,
26
25
} ,
27
26
@@ -41,8 +40,7 @@ ruleTester.run('catch-or-return', rule, {
41
40
options : [ { allowThen : true } ] ,
42
41
} ,
43
42
{
44
- code :
45
- 'frank().then(go).then().then(null, function() { /* why bother */ })' ,
43
+ code : 'frank().then(go).then().then(null, function() { /* why bother */ })' ,
46
44
options : [ { allowThen : true } ] ,
47
45
} ,
48
46
{
@@ -65,8 +63,7 @@ ruleTester.run('catch-or-return', rule, {
65
63
options : [ { allowThen : true } ] ,
66
64
} ,
67
65
{
68
- code :
69
- 'frank().then(a).then(b).then(null, function() { /* why bother */ })' ,
66
+ code : 'frank().then(a).then(b).then(null, function() { /* why bother */ })' ,
70
67
options : [ { allowThen : true } ] ,
71
68
} ,
72
69
@@ -80,8 +77,7 @@ ruleTester.run('catch-or-return', rule, {
80
77
options : [ { allowThen : true } ] ,
81
78
} ,
82
79
{
83
- code :
84
- 'frank().then(go).then().then(function() {}, function() { /* why bother */ })' ,
80
+ code : 'frank().then(go).then().then(function() {}, function() { /* why bother */ })' ,
85
81
options : [ { allowThen : true } ] ,
86
82
} ,
87
83
{
@@ -99,8 +95,7 @@ ruleTester.run('catch-or-return', rule, {
99
95
options : [ { allowFinally : true } ] ,
100
96
} ,
101
97
{
102
- code :
103
- 'frank().then(go).then().catch(function() { /* why bother */ }).finally(fn)' ,
98
+ code : 'frank().then(go).then().catch(function() { /* why bother */ }).finally(fn)' ,
104
99
options : [ { allowFinally : true } ] ,
105
100
} ,
106
101
@@ -167,8 +162,7 @@ ruleTester.run('catch-or-return', rule, {
167
162
errors : [ { message : catchMessage } ] ,
168
163
} ,
169
164
{
170
- code :
171
- 'frank().then(go).then().catch(function() { /* why bother */ }).finally(fn)' ,
165
+ code : 'frank().then(go).then().catch(function() { /* why bother */ }).finally(fn)' ,
172
166
errors : [ { message : catchMessage } ] ,
173
167
} ,
174
168
0 commit comments