Skip to content

Commit 441027a

Browse files
authored
tools: enforce trailing commas in test/sequential
PR-URL: #60892 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]>
1 parent ecdf6a8 commit 441027a

File tree

56 files changed

+181
-165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+181
-165
lines changed

test/eslint.config_partial.mjs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ export default [
148148
files: [
149149
'test/es-module/**/*.{js,mjs}',
150150
'test/parallel/**/*.{js,mjs}',
151-
'test/sequential/**/*.{js,mjs}',
152151
],
153152
rules: {
154153
'@stylistic/js/comma-dangle': [
@@ -163,6 +162,23 @@ export default [
163162
],
164163
},
165164
},
165+
{
166+
files: [
167+
'test/sequential/**/*.{js,mjs}',
168+
],
169+
rules: {
170+
'@stylistic/js/comma-dangle': [
171+
'error',
172+
{
173+
arrays: 'always-multiline',
174+
exports: 'always-multiline',
175+
functions: 'only-multiline',
176+
imports: 'always-multiline',
177+
objects: 'always-multiline',
178+
},
179+
],
180+
},
181+
},
166182
{
167183
files: [
168184
'test/{common,fixtures,wpt}/**/*.{js,mjs,cjs}',

test/sequential/test-child-process-execsync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,5 +156,5 @@ const args = [
156156

157157
// Verify the shell option works properly
158158
execFileSync(`"${common.isWindows ? process.execPath : '$NODE'}"`, [], {
159-
encoding: 'utf8', shell: true, env
159+
encoding: 'utf8', shell: true, env,
160160
});

test/sequential/test-child-process-exit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if (gen === maxGen) {
4040
}
4141

4242
const child = ch.spawn(process.execPath, [__filename, gen + 1], {
43-
stdio: [ 'ignore', 'pipe', 'ignore' ]
43+
stdio: [ 'ignore', 'pipe', 'ignore' ],
4444
});
4545
assert.ok(!child.stdin);
4646
assert.ok(child.stdout);

test/sequential/test-cli-syntax-require.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const syntaxErrorRE = /^SyntaxError: \b/m;
2828

2929
// stderr should include the filename
3030
assert(output.startsWith(file), `${output} starts with ${file}`);
31-
}
31+
},
3232
});
3333
});
3434
});

test/sequential/test-cluster-inspect-brk.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if (cluster.isPrimary) {
1414

1515
cluster.setupPrimary({
1616
execArgv: execArgv,
17-
stdio: ['pipe', 'pipe', 'pipe', 'ipc', 'pipe']
17+
stdio: ['pipe', 'pipe', 'pipe', 'ipc', 'pipe'],
1818
});
1919

2020
const worker = cluster.fork();

test/sequential/test-cpu-prof-default.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const { spawnSync } = require('child_process');
1515
const tmpdir = require('../common/tmpdir');
1616
const {
1717
getCpuProfiles,
18-
env
18+
env,
1919
} = require('../common/cpu-prof');
2020

2121
{
@@ -25,7 +25,7 @@ const {
2525
fixtures.path('workload', 'fibonacci.js'),
2626
], {
2727
cwd: tmpdir.path,
28-
env
28+
env,
2929
});
3030
if (output.status !== 0) {
3131
console.log(output.stderr.toString());

test/sequential/test-cpu-prof-dir-absolute.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const {
1515
getCpuProfiles,
1616
kCpuProfInterval,
1717
env,
18-
verifyFrames
18+
verifyFrames,
1919
} = require('../common/cpu-prof');
2020

2121
// relative --cpu-prof-dir
@@ -31,7 +31,7 @@ const {
3131
fixtures.path('workload', 'fibonacci.js'),
3232
], {
3333
cwd: tmpdir.path,
34-
env
34+
env,
3535
});
3636
if (output.status !== 0) {
3737
console.log(output.stderr.toString());

test/sequential/test-cpu-prof-dir-and-name.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const {
1616
getCpuProfiles,
1717
kCpuProfInterval,
1818
env,
19-
verifyFrames
19+
verifyFrames,
2020
} = require('../common/cpu-prof');
2121

2222
{
@@ -34,7 +34,7 @@ const {
3434
fixtures.path('workload', 'fibonacci.js'),
3535
], {
3636
cwd: tmpdir.path,
37-
env
37+
env,
3838
});
3939
if (output.status !== 0) {
4040
console.log(output.stderr.toString());

test/sequential/test-cpu-prof-dir-relative.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const {
1515
getCpuProfiles,
1616
kCpuProfInterval,
1717
env,
18-
verifyFrames
18+
verifyFrames,
1919
} = require('../common/cpu-prof');
2020

2121
// relative --cpu-prof-dir
@@ -30,7 +30,7 @@ const {
3030
fixtures.path('workload', 'fibonacci.js'),
3131
], {
3232
cwd: tmpdir.path,
33-
env
33+
env,
3434
});
3535
if (output.status !== 0) {
3636
console.log(output.stderr.toString());

test/sequential/test-cpu-prof-dir-worker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const {
1515
getCpuProfiles,
1616
kCpuProfInterval,
1717
env,
18-
getFrames
18+
getFrames,
1919
} = require('../common/cpu-prof');
2020

2121
// --cpu-prof-dir with worker
@@ -30,7 +30,7 @@ const {
3030
fixtures.path('workload', 'fibonacci-worker.js'),
3131
], {
3232
cwd: tmpdir.path,
33-
env
33+
env,
3434
});
3535
if (output.status !== 0) {
3636
console.log(output.stderr.toString());

0 commit comments

Comments
 (0)