Skip to content

Commit 8b865ba

Browse files
committed
Update eslint dependencies, fix issues.
- Update to eslint@8. - Update to eslint-config-digitalbazaar@3. - Fix lint issues.
1 parent ce7f2be commit 8b865ba

File tree

6 files changed

+23
-21
lines changed

6 files changed

+23
-21
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
### Changed
1010
- Change EARL Assertor to Digital Bazaar, Inc.
11+
- Update eslint dependencies.
1112

1213
## 6.0.0 - 2022-06-06
1314

benchmarks/compare/.eslintrc.cjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
extends: [
7+
'digitalbazaar',
8+
'digitalbazaar/module'
9+
]
10+
};

benchmarks/compare/.eslintrc.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

benchmarks/compare/compare.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import yargs from 'yargs';
44
import {hideBin} from 'yargs/helpers';
55
import {promises as fs} from 'node:fs';
6-
import {table} from 'table';
76
import {markdownTable} from 'markdown-table';
87
import commonPathPrefix from 'common-path-prefix';
98

@@ -35,17 +34,17 @@ yargs(hideBin(process.argv))
3534
.command(
3635
'$0 <file...>',
3736
'compare JSON-LD benchmark files', () => {},
38-
async (argv) => {
37+
async argv => {
3938
return compare(argv);
4039
})
4140
.parse();
4241

4342
async function compare({
4443
env,
4544
file,
46-
format,
45+
//format,
4746
relative,
48-
verbose
47+
//verbose
4948
}) {
5049
const contents = await Promise.all(file.map(async f => ({
5150
fn: f,
@@ -86,7 +85,7 @@ async function compare({
8685
return a['jldb:result']['jldb:hz'];
8786
}
8887
function rfmt(base, a) {
89-
return relative ? (100*(a-base)/base) : a;
88+
return relative ? (100 * (a - base) / base) : a;
9089
}
9190
const compared = ordered.map(t => [
9291
t.slice(tprefixlen),
@@ -110,7 +109,7 @@ async function compare({
110109
], {
111110
align: [
112111
'l',
113-
...results.map(r => 'r')
112+
...results.map(() => 'r')
114113
]
115114
}));
116115
console.log();

benchmarks/compare/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@
2626
"main": "compare.js",
2727
"dependencies": {
2828
"common-path-prefix": "^3.0.0",
29+
"eslint-plugin-unicorn": "^42.0.0",
2930
"markdown-table": "^3.0.2",
30-
"yargs": "^17.4.0"
31+
"yargs": "^17.5.1"
3132
},
3233
"devDependencies": {
33-
"eslint": "^8.11.0",
34-
"eslint-config-digitalbazaar": "^2.8.0"
34+
"eslint": "^8.17.0",
35+
"eslint-config-digitalbazaar": "^3.0.0"
3536
},
3637
"engines": {
3738
"node": ">=12"
@@ -46,6 +47,6 @@
4647
"benchmark"
4748
],
4849
"scripts": {
49-
"lint": "eslint *.js"
50+
"lint": "eslint ."
5051
}
5152
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
"cors": "^2.7.1",
5050
"cross-env": "^7.0.3",
5151
"envify": "^4.1.0",
52-
"eslint": "^7.23.0",
53-
"eslint-config-digitalbazaar": "^2.6.1",
52+
"eslint": "^8.17.0",
53+
"eslint-config-digitalbazaar": "^3.0.0",
5454
"esmify": "^2.1.1",
5555
"express": "^4.16.4",
5656
"fs-extra": "^9.1.0",

0 commit comments

Comments
 (0)