Skip to content

Commit f8a0261

Browse files
iirojokonet
authored andcommittedMay 7, 2021
fix: migrate commander@7
1 parent 5560d97 commit f8a0261

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed
 

‎bin/lint-staged.js

+11-9
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,19 @@ const getMaxArgLength = () => {
7474
}
7575
}
7676

77+
const cmdlineOptions = cmdline.opts()
78+
7779
const options = {
78-
allowEmpty: !!cmdline.allowEmpty,
79-
concurrent: JSON.parse(cmdline.concurrent),
80-
configPath: cmdline.config,
81-
debug: !!cmdline.debug,
80+
allowEmpty: !!cmdlineOptions.allowEmpty,
81+
concurrent: JSON.parse(cmdlineOptions.concurrent),
82+
configPath: cmdlineOptions.config,
83+
debug: !!cmdlineOptions.debug,
8284
maxArgLength: getMaxArgLength() / 2,
83-
stash: !!cmdline.stash, // commander inverts `no-<x>` flags to `!x`
84-
quiet: !!cmdline.quiet,
85-
relative: !!cmdline.relative,
86-
shell: !!cmdline.shell,
87-
verbose: !!cmdline.verbose,
85+
stash: !!cmdlineOptions.stash, // commander inverts `no-<x>` flags to `!x`
86+
quiet: !!cmdlineOptions.quiet,
87+
relative: !!cmdlineOptions.relative,
88+
shell: !!cmdlineOptions.shell,
89+
verbose: !!cmdlineOptions.verbose,
8890
}
8991

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

0 commit comments

Comments
 (0)
Please sign in to comment.