Skip to content

Commit 8e4f901

Browse files
authored
Fix linting errors (#462)
1 parent 2f61456 commit 8e4f901

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ const onetime = require('onetime');
88
const makeError = require('./lib/error');
99
const normalizeStdio = require('./lib/stdio');
1010
const {spawnedKill, spawnedCancel, setupTimeout, setExitHandler} = require('./lib/kill');
11-
const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = require('./lib/stream.js');
12-
const {mergePromise, getSpawnedPromise} = require('./lib/promise.js');
13-
const {joinCommand, parseCommand} = require('./lib/command.js');
11+
const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = require('./lib/stream');
12+
const {mergePromise, getSpawnedPromise} = require('./lib/promise');
13+
const {joinCommand, parseCommand} = require('./lib/command');
1414

1515
const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;
1616

lib/stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const mergeStream = require('merge-stream');
66
// `input` option
77
const handleInput = (spawned, input) => {
88
// Checking for stdin is workaround for https://github.com/nodejs/node/issues/26852
9-
// TODO: Remove `|| spawned.stdin === undefined` once we drop support for Node.js <=12.2.0
9+
// @todo remove `|| spawned.stdin === undefined` once we drop support for Node.js <=12.2.0
1010
if (input === undefined || spawned.stdin === undefined) {
1111
return;
1212
}

test/kill.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ test('spawnAndExit detached', spawnAndExit, false, true);
138138
test('spawnAndExit cleanup detached', spawnAndExit, true, true);
139139

140140
// When parent process exits before child process
141-
const spawnAndKill = async (t, signal, cleanup, detached, isKilled) => {
141+
const spawnAndKill = async (t, [signal, cleanup, detached, isKilled]) => {
142142
const subprocess = execa('sub-process', [cleanup, detached], {stdio: ['ignore', 'ignore', 'ignore', 'ipc']});
143143

144144
const pid = await pEvent(subprocess, 'message');
@@ -164,18 +164,18 @@ const spawnAndKill = async (t, signal, cleanup, detached, isKilled) => {
164164
// With `options.cleanup`, subprocesses are always killed
165165
// - `options.cleanup` with SIGKILL is a noop, since it cannot be handled
166166
const exitIfWindows = process.platform === 'win32';
167-
test('spawnAndKill SIGTERM', spawnAndKill, 'SIGTERM', false, false, exitIfWindows);
168-
test('spawnAndKill SIGKILL', spawnAndKill, 'SIGKILL', false, false, exitIfWindows);
169-
test('spawnAndKill cleanup SIGTERM', spawnAndKill, 'SIGTERM', true, false, true);
170-
test('spawnAndKill cleanup SIGKILL', spawnAndKill, 'SIGKILL', true, false, exitIfWindows);
171-
test('spawnAndKill detached SIGTERM', spawnAndKill, 'SIGTERM', false, true, false);
172-
test('spawnAndKill detached SIGKILL', spawnAndKill, 'SIGKILL', false, true, false);
173-
test('spawnAndKill cleanup detached SIGTERM', spawnAndKill, 'SIGTERM', true, true, false);
174-
test('spawnAndKill cleanup detached SIGKILL', spawnAndKill, 'SIGKILL', true, true, false);
167+
test('spawnAndKill SIGTERM', spawnAndKill, ['SIGTERM', false, false, exitIfWindows]);
168+
test('spawnAndKill SIGKILL', spawnAndKill, ['SIGKILL', false, false, exitIfWindows]);
169+
test('spawnAndKill cleanup SIGTERM', spawnAndKill, ['SIGTERM', true, false, true]);
170+
test('spawnAndKill cleanup SIGKILL', spawnAndKill, ['SIGKILL', true, false, exitIfWindows]);
171+
test('spawnAndKill detached SIGTERM', spawnAndKill, ['SIGTERM', false, true, false]);
172+
test('spawnAndKill detached SIGKILL', spawnAndKill, ['SIGKILL', false, true, false]);
173+
test('spawnAndKill cleanup detached SIGTERM', spawnAndKill, ['SIGTERM', true, true, false]);
174+
test('spawnAndKill cleanup detached SIGKILL', spawnAndKill, ['SIGKILL', true, true, false]);
175175

176176
// See #128
177177
test('removes exit handler on exit', async t => {
178-
// FIXME: This relies on `signal-exit` internals
178+
// @todo this relies on `signal-exit` internals
179179
const emitter = process.__signal_exit_emitter__;
180180

181181
const subprocess = execa('noop');

0 commit comments

Comments
 (0)