Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few lgtm.com issues. #674

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cache.completion = function (opts, cb) {
}
}

exports = module.exports = cache
module.exports = cache
function cache (args, cb) {
const cmd = args.shift()
let result
Expand Down
2 changes: 1 addition & 1 deletion lib/install/deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ function andHandleOptionalErrors (log, tree, name, done) {
if (!er) validate('OO', [child, childLog])
if (!er) return done(er, child, childLog)
var isFatal = failedDependency(tree, name)
if (er && !isFatal) {
if (!isFatal) {
reportOptionalFailure(tree, name, er)
return done()
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/ls.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// <fullpath>:<name@ver>:<realpath>:<flags>
// Flags are a :-separated list of zero or more indicators

module.exports = exports = ls
module.exports = ls

var path = require('path')
var url = require('url')
Expand Down
2 changes: 1 addition & 1 deletion lib/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@

startMetrics()

return cb(null, npm)
return cb(null)
})
})
}
Expand Down
2 changes: 1 addition & 1 deletion lib/outdated.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function outdated (args, silent, cb) {
if (opts.json) {
output(makeJSON(list, opts))
} else if (opts.parseable) {
output(makeParseable(list, opts))
output(makeParseable(list))
} else {
var outList = list.map(x => makePretty(x, opts))
var outHead = [ 'Package',
Expand Down
2 changes: 1 addition & 1 deletion lib/search.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

module.exports = exports = search
module.exports = search

const npm = require('./npm.js')
const allPackageSearch = require('./search/all-package-search')
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/gently-rm.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// only remove the thing if it's a symlink into a specific folder. This is
// a very common use-case of npm's, but not so common elsewhere.

exports = module.exports = gentlyRm
module.exports = gentlyRm

var gentleFS = require('gentle-fs')
var gentleFSOpts = require('../config/gentle-fs.js')
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/lifecycle-cmd.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exports = module.exports = cmd
module.exports = cmd

var npm = require('../npm.js')
var usage = require('./usage.js')
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/lifecycle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exports = module.exports = runLifecycle
module.exports = runLifecycle

const lifecycleOpts = require('../config/lifecycle')
const lifecycle = require('npm-lifecycle')
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/read-local-package.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exports = module.exports = readLocalPkg
module.exports = readLocalPkg

var npm = require('../npm.js')
var readJson = require('read-package-json')
Expand Down