diff options
author | isaacs <i@izs.me> | 2020-10-23 21:15:35 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2020-10-23 21:23:15 +0300 |
commit | 47640eb2c3cd9891e904e3f6bc705b6618096103 (patch) | |
tree | 8b1b635135a5672ed0da4d8e6feade0f9d8fa60d /lib/cli.js | |
parent | b737ee99961364827bacf210a3e5ca5d2b7edad2 (diff) |
update lint rules to match @npmcli/arborist
Diffstat (limited to 'lib/cli.js')
-rw-r--r-- | lib/cli.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/cli.js b/lib/cli.js index 71bdb1bac..f06abcd18 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -4,7 +4,7 @@ module.exports = (process) => { const { checkForBrokenNode, - checkForUnsupportedNode + checkForUnsupportedNode, } = require('../lib/utils/unsupported.js') checkForBrokenNode() @@ -21,9 +21,8 @@ module.exports = (process) => { // if npm is called as "npmg" or "npm_g", then // run in global mode. - if (process.argv[1][process.argv[1].length - 1] === 'g') { + if (process.argv[1][process.argv[1].length - 1] === 'g') process.argv.splice(1, 1, 'npm', '-g') - } log.verbose('cli', process.argv) @@ -37,7 +36,8 @@ module.exports = (process) => { // this is how to use npm programmatically: const updateNotifier = require('../lib/utils/update-notifier.js') npm.load(async er => { - if (er) return errorHandler(er) + if (er) + return errorHandler(er) if (npm.config.get('version', 'cli')) { console.log(npm.version) return errorHandler.exit(0) @@ -52,9 +52,9 @@ module.exports = (process) => { const cmd = npm.argv.shift() const impl = npm.commands[cmd] - if (impl) { + if (impl) impl(npm.argv, errorHandler) - } else { + else { npm.config.set('usage', false) npm.argv.unshift(cmd) npm.commands.help(npm.argv, errorHandler) |