Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2020-10-23 21:15:35 +0300
committerisaacs <i@izs.me>2020-10-23 21:23:15 +0300
commit47640eb2c3cd9891e904e3f6bc705b6618096103 (patch)
tree8b1b635135a5672ed0da4d8e6feade0f9d8fa60d /lib/bugs.js
parentb737ee99961364827bacf210a3e5ca5d2b7edad2 (diff)
update lint rules to match @npmcli/arborist
Diffstat (limited to 'lib/bugs.js')
-rw-r--r--lib/bugs.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/bugs.js b/lib/bugs.js
index e6940f36b..012f39efb 100644
--- a/lib/bugs.js
+++ b/lib/bugs.js
@@ -12,27 +12,25 @@ const completion = require('./utils/completion/none.js')
const cmd = (args, cb) => bugs(args).then(() => cb()).catch(cb)
const bugs = async args => {
- if (!args || !args.length) {
+ if (!args || !args.length)
args = ['.']
- }
+
await Promise.all(args.map(pkg => getBugs(pkg)))
}
const getBugsUrl = mani => {
if (mani.bugs) {
- if (typeof mani.bugs === 'string') {
+ if (typeof mani.bugs === 'string')
return mani.bugs
- }
- if (typeof mani.bugs === 'object' && mani.bugs.url) {
+
+ if (typeof mani.bugs === 'object' && mani.bugs.url)
return mani.bugs.url
- }
}
// try to get it from the repo, if possible
const info = hostedFromMani(mani)
- if (info) {
+ if (info)
return info.bugs()
- }
// just send them to the website, hopefully that has some info!
return `https://www.npmjs.com/package/${mani.name}`