@@ -20,8 +20,7 @@ ruleTester.run('catch-or-return', rule, {
2020
2121 // arrow function use case
2222 {
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())' ,
2524 parserOptions : { ecmaVersion : 6 } ,
2625 } ,
2726
@@ -41,8 +40,7 @@ ruleTester.run('catch-or-return', rule, {
4140 options : [ { allowThen : true } ] ,
4241 } ,
4342 {
44- code :
45- 'frank().then(go).then().then(null, function() { /* why bother */ })' ,
43+ code : 'frank().then(go).then().then(null, function() { /* why bother */ })' ,
4644 options : [ { allowThen : true } ] ,
4745 } ,
4846 {
@@ -65,8 +63,7 @@ ruleTester.run('catch-or-return', rule, {
6563 options : [ { allowThen : true } ] ,
6664 } ,
6765 {
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 */ })' ,
7067 options : [ { allowThen : true } ] ,
7168 } ,
7269
@@ -80,8 +77,7 @@ ruleTester.run('catch-or-return', rule, {
8077 options : [ { allowThen : true } ] ,
8178 } ,
8279 {
83- code :
84- 'frank().then(go).then().then(function() {}, function() { /* why bother */ })' ,
80+ code : 'frank().then(go).then().then(function() {}, function() { /* why bother */ })' ,
8581 options : [ { allowThen : true } ] ,
8682 } ,
8783 {
@@ -99,8 +95,7 @@ ruleTester.run('catch-or-return', rule, {
9995 options : [ { allowFinally : true } ] ,
10096 } ,
10197 {
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)' ,
10499 options : [ { allowFinally : true } ] ,
105100 } ,
106101
@@ -167,8 +162,7 @@ ruleTester.run('catch-or-return', rule, {
167162 errors : [ { message : catchMessage } ] ,
168163 } ,
169164 {
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)' ,
172166 errors : [ { message : catchMessage } ] ,
173167 } ,
174168
0 commit comments