Skip to content

Commit a82feb5

Browse files
committed
chore: update dependencies to latest minor version
1 parent fa81d93 commit a82feb5

File tree

7 files changed

+1230
-1555
lines changed

7 files changed

+1230
-1555
lines changed

__tests__/always-return.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ ruleTester.run('always-return', rule, {
8282
errors: [{ message }],
8383
},
8484
{
85-
code:
86-
'hey.then(function() { if (x) { return you.then(function() { return x; }); } })',
85+
code: 'hey.then(function() { if (x) { return you.then(function() { return x; }); } })',
8786
errors: [{ message }],
8887
},
8988
{

__tests__/catch-or-return.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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

__tests__/no-callback-in-promise.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ ruleTester.run('no-callback-in-promise', rule, {
6767
errors: [{ message: errorMessage, column: 24 }],
6868
},
6969
{
70-
code:
71-
'a.then(function(data) { callback(data) }, function(err) { callback(err) })',
70+
code: 'a.then(function(data) { callback(data) }, function(err) { callback(err) })',
7271
errors: [
7372
{ message: errorMessage },
7473
{ column: 59, message: errorMessage },

__tests__/no-return-wrap.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,25 +101,21 @@ ruleTester.run('no-return-wrap', rule, {
101101

102102
// needs to also look at weird paths
103103
{
104-
code:
105-
'doThing().then(function(x) { if (x>1) { return Promise.resolve(4) } else { throw "bad" } })',
104+
code: 'doThing().then(function(x) { if (x>1) { return Promise.resolve(4) } else { throw "bad" } })',
106105
errors: [{ message: resolveMessage }],
107106
},
108107
{
109-
code:
110-
'doThing().then(function(x) { if (x>1) { return Promise.reject(4) } })',
108+
code: 'doThing().then(function(x) { if (x>1) { return Promise.reject(4) } })',
111109
errors: [{ message: rejectMessage }],
112110
},
113111
{
114-
code:
115-
'doThing().then(null, function() { if (true && false) { return Promise.resolve() } })',
112+
code: 'doThing().then(null, function() { if (true && false) { return Promise.resolve() } })',
116113
errors: [{ message: resolveMessage }],
117114
},
118115

119116
// should do both
120117
{
121-
code:
122-
'doThing().catch(function(x) {if (x) { return Promise.resolve(4) } else { return Promise.reject() } })',
118+
code: 'doThing().catch(function(x) {if (x) { return Promise.resolve(4) } else { return Promise.reject() } })',
123119
errors: [{ message: resolveMessage }, { message: rejectMessage }],
124120
},
125121

@@ -201,13 +197,11 @@ ruleTester.run('no-return-wrap', rule, {
201197

202198
// function bind
203199
{
204-
code:
205-
'doThing().then((function() { return Promise.resolve(4) }).bind(this))',
200+
code: 'doThing().then((function() { return Promise.resolve(4) }).bind(this))',
206201
errors: [{ message: resolveMessage }],
207202
},
208203
{
209-
code:
210-
'doThing().then((function() { return Promise.resolve(4) }).bind(this).bind(this))',
204+
code: 'doThing().then((function() { return Promise.resolve(4) }).bind(this).bind(this))',
211205
errors: [{ message: resolveMessage }],
212206
},
213207

__tests__/prefer-await-to-then.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ ruleTester.run('prefer-await-to-then', rule, {
3737
errors: [{ message }, { message }, { message }],
3838
},
3939
{
40-
code:
41-
'async function a() { hey.then(function() { }).then(function() { }) }',
40+
code: 'async function a() { hey.then(function() { }).then(function() { }) }',
4241
errors: [{ message }, { message }],
4342
},
4443
{

0 commit comments

Comments
 (0)