Skip to content

Commit a90c42e

Browse files
authored
Merge branch 'development' into setup-node-caching
2 parents f57fd3c + 5641001 commit a90c42e

23 files changed

+1354
-11424
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
8+
- package-ecosystem: npm
9+
directory: /
10+
schedule:
11+
interval: daily

.github/workflows/CI.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ jobs:
66
main:
77
strategy:
88
matrix:
9-
node: [10.12, 10, 12.0, 12, 14, 15]
9+
eslint: [7]
10+
node: [10.12, 10, 12.0, 12, 14, 16]
1011
runs-on: ubuntu-latest
1112
steps:
1213
- name: 🛑 Cancel Previous Runs
13-
uses: styfle/[email protected]
14-
with:
15-
access_token: ${{ secrets.GITHUB_TOKEN }}
14+
uses: styfle/[email protected]
1615

1716
- name: ⬇️ Checkout repo
1817
uses: actions/checkout@v2
@@ -26,5 +25,8 @@ jobs:
2625
- name: 📥 Download deps
2726
run: npm ci
2827

28+
- name: 📥 Install ESLint v${{ matrix.eslint }}
29+
run: npm install eslint@${{ matrix.eslint }}
30+
2931
- name: ▶️ Run test script
3032
run: npm run test -- --runInBand

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
.idea
33
coverage/
4+
.eslintcache

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
coverage

LICENSE.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Copyright (c) 2020, Jamund Ferguson
22

3-
Permission to use, copy, modify, and/or distribute this software for any
4-
purpose with or without fee is hereby granted, provided that the above
5-
copyright notice and this permission notice appear in all copies.
3+
Permission to use, copy, modify, and/or distribute this software for any purpose
4+
with or without fee is hereby granted, provided that the above copyright notice
5+
and this permission notice appear in all copies.
66

77
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
88
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
99
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13-
PERFORMANCE OF THIS SOFTWARE.
10+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
11+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
12+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
13+
THIS SOFTWARE.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ or start with the recommended rule set:
9090
| [`no-new-statics`][no-new-statics] | Avoid calling `new` on a Promise static method | :bangbang: | :wrench: |
9191
| [`no-return-in-finally`][no-return-in-finally] | Disallow return statements in `finally()` | :warning: | |
9292
| [`valid-params`][valid-params] | Ensures the proper number of arguments are passed to Promise functions | :warning: | |
93-
| [`prefer-await-to-then`][prefer-await-to-then] | Prefer `await` to `then()`/`catch()`/`finally()` for reading Promise values | :seven: | |
93+
| [`prefer-await-to-then`][prefer-await-to-then] | Prefer `await` to `then()`/`catch()`/`finally()` for reading Promise values | :seven: | |
9494
| [`prefer-await-to-callbacks`][prefer-await-to-callbacks] | Prefer async/await to the callback pattern | :seven: | |
9595

9696
**Key**

__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

0 commit comments

Comments
 (0)