Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: migrate commander@7
  • Loading branch information
iiroj authored and okonet committed May 7, 2021
1 parent 5560d97 commit f8a0261
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions bin/lint-staged.js
Expand Up @@ -74,17 +74,19 @@ const getMaxArgLength = () => {
}
}

const cmdlineOptions = cmdline.opts()

const options = {
allowEmpty: !!cmdline.allowEmpty,
concurrent: JSON.parse(cmdline.concurrent),
configPath: cmdline.config,
debug: !!cmdline.debug,
allowEmpty: !!cmdlineOptions.allowEmpty,
concurrent: JSON.parse(cmdlineOptions.concurrent),
configPath: cmdlineOptions.config,
debug: !!cmdlineOptions.debug,
maxArgLength: getMaxArgLength() / 2,
stash: !!cmdline.stash, // commander inverts `no-<x>` flags to `!x`
quiet: !!cmdline.quiet,
relative: !!cmdline.relative,
shell: !!cmdline.shell,
verbose: !!cmdline.verbose,
stash: !!cmdlineOptions.stash, // commander inverts `no-<x>` flags to `!x`
quiet: !!cmdlineOptions.quiet,
relative: !!cmdlineOptions.relative,
shell: !!cmdlineOptions.shell,
verbose: !!cmdlineOptions.verbose,
}

debug('Options parsed from command-line:', options)
Expand Down

0 comments on commit f8a0261

Please sign in to comment.