Skip to content

Commit d6f6cf9

Browse files
committed
chore: lint
1 parent d43cecb commit d6f6cf9

8 files changed

Lines changed: 21 additions & 22 deletions

File tree

.eslintrc.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,13 @@
44
"rules": {
55
"no-var": "off"
66
}
7-
}, {
8-
"files": ["madrun.js", "test/**"],
9-
"rules": {
10-
"node/no-unsupported-features/es-syntax": "off"
11-
}
127
}],
138
"extends": [
14-
"plugin:node/recommended",
9+
"plugin:n/recommended",
1510
"plugin:putout/recommended"
1611
],
1712
"plugins": [
1813
"putout",
19-
"node"
14+
"n"
2015
]
2116
}

.github/workflows/nodejs.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,36 @@ jobs:
77
runs-on: ubuntu-latest
88
env:
99
NAME: try-catch
10-
1110
strategy:
1211
matrix:
1312
node-version:
14-
- 16.x
15-
- 18.x
13+
- 20.x
14+
- 22.x
15+
- 24.x
16+
- 25.x
1617
steps:
17-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v5
19+
- uses: oven-sh/setup-bun@v2
20+
with:
21+
bun-version: latest
1822
- name: Use Node.js ${{ matrix.node-version }}
19-
uses: actions/setup-node@v2
23+
uses: actions/setup-node@v6
2024
with:
2125
node-version: ${{ matrix.node-version }}
2226
- name: Install
23-
run: npm i && npm i redrun -g
27+
run: bun i && bun i redrun -g --no-save --no-save
2428
- name: Lint
2529
run: redrun fix:lint
2630
- name: Commit fixes
27-
uses: EndBug/add-and-commit@v7
31+
uses: EndBug/add-and-commit@v9
32+
continue-on-error: true
2833
with:
2934
message: chore(${{ env.NAME }}) lint using actions
3035
- name: Coverage
3136
run: redrun coverage report
32-
3337
- name: Coveralls
34-
uses: coverallsapp/github-action@master
38+
uses: coverallsapp/github-action@v2
39+
continue-on-error: true
3540
with:
3641
github-token: ${{ secrets.GITHUB_TOKEN }}
3742
- name: typos-action

.madrun.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ module.exports = {
99
'coverage': () => 'c8 npm test',
1010
'report': () => 'c8 report --reporter=lcov',
1111
};
12-

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ madrun.js
55

66
yarn-error.log
77
coverage
8+
*.config.*

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const [error, result] = tryCatch(parse, 'hello');
2626

2727
if (error)
2828
console.error(error.message);
29-
3029
```
3130

3231
## Related

lib/try-catch.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ module.exports = (fn, ...args) => {
77
return [e];
88
}
99
};
10-

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"homepage": "http://github.com/coderaiser/try-catch",
88
"repository": {
99
"type": "git",
10-
"url": "git://github.com/coderaiser/try-catch.git"
10+
"url": "git+https://github.com/coderaiser/try-catch.git"
1111
},
1212
"scripts": {
1313
"test": "madrun test",

test/try-catch.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ test('try-catch: result', (t) => {
2222
});
2323

2424
test('try-catch: args: result', (t) => {
25-
const [, data] = tryCatch(JSON.stringify, {a: 'b'});
25+
const [, data] = tryCatch(JSON.stringify, {
26+
a: 'b',
27+
});
2628

2729
t.equal(data, '{"a":"b"}');
2830
t.end();
2931
});
30-

0 commit comments

Comments
 (0)