Skip to content

Commit 43cb152

Browse files
committed
chore: fix lint
1 parent 70328c5 commit 43cb152

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

bin/eslint-multiplexer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const options = buildOptions({
4747

4848
const args = minimist(process.argv.slice(2), options)
4949
const cli = {
50-
input: args['_'],
50+
input: args._,
5151
flags: args
5252
}
5353

lib/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ class Multiplexer {
8080
resolveModulePath(modulePath) {
8181
const cwd = process.cwd()
8282
const paths = [
83-
[ cwd, 'node_modules', modulePath, 'bin', modulePath + '.js' ],
84-
[ cwd, 'node_modules', modulePath, 'bin', modulePath ],
85-
[ cwd, 'node_modules', '.bin', modulePath ],
86-
[ __dirname, '..', 'node_modules', '.bin', modulePath ],
87-
[ cwd, modulePath ],
83+
[cwd, 'node_modules', modulePath, 'bin', modulePath + '.js'],
84+
[cwd, 'node_modules', modulePath, 'bin', modulePath],
85+
[cwd, 'node_modules', '.bin', modulePath],
86+
[__dirname, '..', 'node_modules', '.bin', modulePath],
87+
[cwd, modulePath],
8888
['']
8989
]
9090
for (let i = 0; i < paths.length; i++) {
@@ -154,7 +154,7 @@ class Multiplexer {
154154
Array.prototype.push.apply(args, ['-f', 'json'])
155155

156156
const sp = spawn(process.execPath, args, {
157-
stdio: [ 'ignore', 'pipe', 'inherit' ]
157+
stdio: ['ignore', 'pipe', 'inherit']
158158
})
159159

160160
let data = ''

test/cli.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@ describe('cli', () => {
153153
'./node_modules/eslint/bin/eslint.js',
154154
'--no-ignore', './test/fixtures',
155155
'-f', 'json'
156-
], { stdio: [ 'inherit', 'pipe', 'inherit' ] })
156+
], { stdio: ['inherit', 'pipe', 'inherit'] })
157157

158158
const multiplexer = spawn(process.execPath, [
159159
'./bin/eslint-multiplexer',
160160
'--nopipe',
161161
'-b'
162-
], { stdio: [ 'pipe', 'pipe', 'pipe' ] })
162+
], { stdio: ['pipe', 'pipe', 'pipe'] })
163163

164164
multiplexer.stdin.setEncoding('utf8')
165165
eslint.stdout.pipe(multiplexer.stdin)
@@ -189,13 +189,13 @@ describe('cli', () => {
189189
'./bin/eslint-multiplexer',
190190
'eslint',
191191
'--no-ignore', './test/fixtures/index.js'
192-
], { stdio: [ 'inherit', 'pipe', 'inherit' ] })
192+
], { stdio: ['inherit', 'pipe', 'inherit'] })
193193

194194
const eslint2 = spawn(process.execPath, [
195195
'./bin/eslint-multiplexer',
196196
'eslint',
197197
'--no-ignore', './test/fixtures/first/index.js'
198-
], { stdio: [ 'pipe', 'pipe', 'inherit' ] })
198+
], { stdio: ['pipe', 'pipe', 'inherit'] })
199199

200200
eslint2.stdin.setEncoding('utf8')
201201
eslint1.stdout.pipe(eslint2.stdin)
@@ -204,7 +204,7 @@ describe('cli', () => {
204204
'./bin/eslint-multiplexer',
205205
'--nopipe',
206206
'-b', '--debug'
207-
], { stdio: [ 'pipe', 'pipe', 'pipe' ] })
207+
], { stdio: ['pipe', 'pipe', 'pipe'] })
208208

209209
multiplexer.stdin.setEncoding('utf8')
210210
eslint2.stdout.pipe(multiplexer.stdin)

0 commit comments

Comments
 (0)