Skip to content

Commit 26e1a81

Browse files
aduh95danielleadams
authored andcommitted
benchmark: add trailing commas in benchmark/module
PR-URL: #46461 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent bd6c828 commit 26e1a81

5 files changed

+10
-11
lines changed

benchmark/.eslintrc.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ overrides:
1515
- http/*.js
1616
- http2/*.js
1717
- misc/*.js
18-
- module/*.js
1918
- path/*.js
2019
- process/*.js
2120
- url/*.js

benchmark/module/module-loader-circular.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const benchmarkDirectory =
88
path.resolve(tmpdir.path, 'benchmark-module-circular');
99

1010
const bench = common.createBenchmark(main, {
11-
n: [1e4]
11+
n: [1e4],
1212
});
1313

1414
function main({ n }) {

benchmark/module/module-loader-deep.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ const benchmarkDirectory = path.join(tmpdir.path, 'nodejs-benchmark-module');
99
const bench = common.createBenchmark(main, {
1010
ext: ['', '.js'],
1111
files: [1e3],
12-
cache: ['true', 'false']
12+
cache: ['true', 'false'],
1313
});
1414

1515
function main({ ext, cache, files }) {
1616
tmpdir.refresh();
1717
fs.mkdirSync(benchmarkDirectory);
1818
fs.writeFileSync(
1919
`${benchmarkDirectory}/a.js`,
20-
'module.exports = {};'
20+
'module.exports = {};',
2121
);
2222
for (let i = 0; i <= files; i++) {
2323
fs.mkdirSync(`${benchmarkDirectory}/${i}`);
2424
fs.writeFileSync(
2525
`${benchmarkDirectory}/${i}/package.json`,
26-
'{"main": "index.js"}'
26+
'{"main": "index.js"}',
2727
);
2828
fs.writeFileSync(
2929
`${benchmarkDirectory}/${i}/index.js`,
30-
`require('../a${ext}');`
30+
`require('../a${ext}');`,
3131
);
3232
}
3333

benchmark/module/module-loader.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const bench = common.createBenchmark(main, {
1515
dir: ['rel', 'abs'],
1616
files: [5e2],
1717
n: [1, 1e3],
18-
cache: ['true', 'false']
18+
cache: ['true', 'false'],
1919
});
2020

2121
function main({ n, name, cache, files, dir }) {
@@ -25,11 +25,11 @@ function main({ n, name, cache, files, dir }) {
2525
fs.mkdirSync(`${benchmarkDirectory}${i}`);
2626
fs.writeFileSync(
2727
`${benchmarkDirectory}${i}/package.json`,
28-
'{"main": "index.js"}'
28+
'{"main": "index.js"}',
2929
);
3030
fs.writeFileSync(
3131
`${benchmarkDirectory}${i}/index.js`,
32-
'module.exports = "";'
32+
'module.exports = "";',
3333
);
3434
}
3535

benchmark/module/module-require.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ function createEntryPoint(n) {
7070
fs.mkdirSync(`${benchmarkDirectory}${i}`);
7171
fs.writeFileSync(
7272
`${benchmarkDirectory}${i}/package.json`,
73-
'{"main": "index.js"}'
73+
'{"main": "index.js"}',
7474
);
7575
fs.writeFileSync(
7676
`${benchmarkDirectory}${i}/index.js`,
77-
JSFileContent
77+
JSFileContent,
7878
);
7979
}
8080
}

0 commit comments

Comments
 (0)