Skip to content

Commit bc65288

Browse files
authoredDec 17, 2021
Merge pull request #228 from MichaelDeBoey/patch-2
chore: update dependencies to latest minor version
2 parents 5db056c + 26a4ab8 commit bc65288

7 files changed

+1230
-1555
lines changed
 

‎__tests__/always-return.js

+1-2
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

+6-12
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

+1-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ ruleTester.run('no-callback-in-promise', rule, {
7575
errors: [{ message: errorMessage, column: 24 }],
7676
},
7777
{
78-
code:
79-
'a.then(function(data) { callback(data) }, function(err) { callback(err) })',
78+
code: 'a.then(function(data) { callback(data) }, function(err) { callback(err) })',
8079
errors: [
8180
{ message: errorMessage },
8281
{ column: 59, message: errorMessage },

‎__tests__/no-return-wrap.js

+6-12
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

+1-2
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
{

‎package-lock.json

+1,207-1,517
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@
2424
},
2525
"dependencies": {},
2626
"devDependencies": {
27-
"doctoc": "^2.0.0",
28-
"eslint": "^7.23.0",
29-
"eslint-config-prettier": "^8.1.0",
30-
"eslint-plugin-eslint-plugin": "^3.0.0",
31-
"eslint-plugin-jest": "^24.3.4",
27+
"doctoc": "^2.1.0",
28+
"eslint": "^7.32.0",
29+
"eslint-config-prettier": "^8.3.0",
30+
"eslint-plugin-eslint-plugin": "^3.6.1",
31+
"eslint-plugin-jest": "^25.3.0",
3232
"eslint-plugin-node": "^11.1.0",
33-
"eslint-plugin-prettier": "^3.3.1",
33+
"eslint-plugin-prettier": "^3.4.1",
3434
"husky": "^6.0.0",
3535
"jest": "^26.6.3",
36-
"jest-runner-eslint": "^0.10.0",
36+
"jest-runner-eslint": "^0.11.1",
3737
"lint-staged": "^10.5.4",
38-
"prettier": "^2.2.1"
38+
"prettier": "2.5.1"
3939
},
4040
"peerDependencies": {
4141
"eslint": "^7.0.0"

0 commit comments

Comments
 (0)
Please sign in to comment.