Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pimlie committed Aug 24, 2019
1 parent 70328c5 commit 43cb152
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bin/eslint-multiplexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const options = buildOptions({

const args = minimist(process.argv.slice(2), options)
const cli = {
input: args['_'],
input: args._,
flags: args
}

Expand Down
12 changes: 6 additions & 6 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ class Multiplexer {
resolveModulePath(modulePath) {
const cwd = process.cwd()
const paths = [
[ cwd, 'node_modules', modulePath, 'bin', modulePath + '.js' ],
[ cwd, 'node_modules', modulePath, 'bin', modulePath ],
[ cwd, 'node_modules', '.bin', modulePath ],
[ __dirname, '..', 'node_modules', '.bin', modulePath ],
[ cwd, modulePath ],
[cwd, 'node_modules', modulePath, 'bin', modulePath + '.js'],
[cwd, 'node_modules', modulePath, 'bin', modulePath],
[cwd, 'node_modules', '.bin', modulePath],
[__dirname, '..', 'node_modules', '.bin', modulePath],
[cwd, modulePath],
['']
]
for (let i = 0; i < paths.length; i++) {
Expand Down Expand Up @@ -154,7 +154,7 @@ class Multiplexer {
Array.prototype.push.apply(args, ['-f', 'json'])

const sp = spawn(process.execPath, args, {
stdio: [ 'ignore', 'pipe', 'inherit' ]
stdio: ['ignore', 'pipe', 'inherit']
})

let data = ''
Expand Down
10 changes: 5 additions & 5 deletions test/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ describe('cli', () => {
'./node_modules/eslint/bin/eslint.js',
'--no-ignore', './test/fixtures',
'-f', 'json'
], { stdio: [ 'inherit', 'pipe', 'inherit' ] })
], { stdio: ['inherit', 'pipe', 'inherit'] })

const multiplexer = spawn(process.execPath, [
'./bin/eslint-multiplexer',
'--nopipe',
'-b'
], { stdio: [ 'pipe', 'pipe', 'pipe' ] })
], { stdio: ['pipe', 'pipe', 'pipe'] })

multiplexer.stdin.setEncoding('utf8')
eslint.stdout.pipe(multiplexer.stdin)
Expand Down Expand Up @@ -189,13 +189,13 @@ describe('cli', () => {
'./bin/eslint-multiplexer',
'eslint',
'--no-ignore', './test/fixtures/index.js'
], { stdio: [ 'inherit', 'pipe', 'inherit' ] })
], { stdio: ['inherit', 'pipe', 'inherit'] })

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

eslint2.stdin.setEncoding('utf8')
eslint1.stdout.pipe(eslint2.stdin)
Expand All @@ -204,7 +204,7 @@ describe('cli', () => {
'./bin/eslint-multiplexer',
'--nopipe',
'-b', '--debug'
], { stdio: [ 'pipe', 'pipe', 'pipe' ] })
], { stdio: ['pipe', 'pipe', 'pipe'] })

multiplexer.stdin.setEncoding('utf8')
eslint2.stdout.pipe(multiplexer.stdin)
Expand Down

0 comments on commit 43cb152

Please sign in to comment.