diff options
author | isaacs <i@izs.me> | 2020-12-11 23:04:52 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2020-12-11 23:05:42 +0300 |
commit | b1871e4bc24f18497ed7a9e6596a11ffe030f013 (patch) | |
tree | 056b4f0ed6a33c5fc350a19ff6f7e8f3ceaff964 /lib | |
parent | 011bb122035dcd43769ec35982662cca41635068 (diff) |
Remove 'use strict'
We have a linter.
yolo
Diffstat (limited to 'lib')
50 files changed, 0 insertions, 86 deletions
diff --git a/lib/access.js b/lib/access.js index 73228cae0..68c6e628d 100644 --- a/lib/access.js +++ b/lib/access.js @@ -1,5 +1,3 @@ -'use strict' - const path = require('path') const libaccess = require('libnpmaccess') diff --git a/lib/adduser.js b/lib/adduser.js index 5017f57a8..4b9fdf1f5 100644 --- a/lib/adduser.js +++ b/lib/adduser.js @@ -1,5 +1,3 @@ -'use strict' - const log = require('npmlog') const npm = require('./npm.js') const output = require('./utils/output.js') diff --git a/lib/auth/legacy.js b/lib/auth/legacy.js index 4178c40b9..f291ca794 100644 --- a/lib/auth/legacy.js +++ b/lib/auth/legacy.js @@ -1,5 +1,3 @@ -'use strict' - const log = require('npmlog') const profile = require('npm-profile') diff --git a/lib/auth/sso.js b/lib/auth/sso.js index 8e4c34531..378295f5f 100644 --- a/lib/auth/sso.js +++ b/lib/auth/sso.js @@ -1,5 +1,3 @@ -'use strict' - // XXX: To date, npm Enterprise Legacy is the only system that ever // implemented support for this type of login. A better way to do // SSO is to use the WebLogin type of login supported by the npm-login diff --git a/lib/deprecate.js b/lib/deprecate.js index 8c43efcda..fbaad54b7 100644 --- a/lib/deprecate.js +++ b/lib/deprecate.js @@ -1,5 +1,3 @@ -'use strict' - const npm = require('./npm.js') const fetch = require('npm-registry-fetch') const otplease = require('./utils/otplease.js') diff --git a/lib/dist-tag.js b/lib/dist-tag.js index bd7ccc9e0..ae4b33ce8 100644 --- a/lib/dist-tag.js +++ b/lib/dist-tag.js @@ -1,5 +1,3 @@ -'use strict' - const log = require('npmlog') const npa = require('npm-package-arg') const regFetch = require('npm-registry-fetch') diff --git a/lib/init.js b/lib/init.js index ac49f54a7..6e4213c28 100644 --- a/lib/init.js +++ b/lib/init.js @@ -1,5 +1,3 @@ -'use strict' - const initJson = require('init-package-json') const npa = require('npm-package-arg') diff --git a/lib/install.js b/lib/install.js index f621c85c2..303370594 100644 --- a/lib/install.js +++ b/lib/install.js @@ -1,4 +1,3 @@ -'use strict' /* eslint-disable camelcase */ /* eslint-disable standard/no-callback-literal */ const fs = require('fs') diff --git a/lib/link.js b/lib/link.js index 3f0a51808..f7e13369c 100644 --- a/lib/link.js +++ b/lib/link.js @@ -1,5 +1,3 @@ -'use strict' - const { readdir } = require('fs') const { resolve } = require('path') diff --git a/lib/logout.js b/lib/logout.js index 32f74831d..ba2eb92fe 100644 --- a/lib/logout.js +++ b/lib/logout.js @@ -1,5 +1,3 @@ -'use strict' - const eu = encodeURIComponent const log = require('npmlog') const getAuth = require('npm-registry-fetch/auth.js') @@ -1,5 +1,3 @@ -'use strict' - const { resolve } = require('path') const { EOL } = require('os') diff --git a/lib/org.js b/lib/org.js index 12e46dd8e..d430131f8 100644 --- a/lib/org.js +++ b/lib/org.js @@ -1,5 +1,3 @@ -'use strict' - const liborg = require('libnpmorg') const npm = require('./npm.js') const output = require('./utils/output.js') diff --git a/lib/outdated.js b/lib/outdated.js index 06bdc4c2d..f0ec7a72f 100644 --- a/lib/outdated.js +++ b/lib/outdated.js @@ -1,5 +1,3 @@ -'use strict' - const os = require('os') const path = require('path') const pacote = require('pacote') diff --git a/lib/owner.js b/lib/owner.js index dcc1ff630..0bfb0a6a5 100644 --- a/lib/owner.js +++ b/lib/owner.js @@ -1,5 +1,3 @@ -'use strict' - const log = require('npmlog') const npa = require('npm-package-arg') const npmFetch = require('npm-registry-fetch') diff --git a/lib/profile.js b/lib/profile.js index cdecef3af..50d7ddd7d 100644 --- a/lib/profile.js +++ b/lib/profile.js @@ -1,5 +1,3 @@ -'use strict' - const ansistyles = require('ansistyles') const inspect = require('util').inspect const log = require('npmlog') diff --git a/lib/publish.js b/lib/publish.js index da58134f7..da07a7038 100644 --- a/lib/publish.js +++ b/lib/publish.js @@ -1,5 +1,3 @@ -'use strict' - const util = require('util') const log = require('npmlog') const semver = require('semver') diff --git a/lib/rebuild.js b/lib/rebuild.js index f373d8cf5..e02c89bd7 100644 --- a/lib/rebuild.js +++ b/lib/rebuild.js @@ -1,5 +1,3 @@ -'use strict' - const { resolve } = require('path') const Arborist = require('@npmcli/arborist') const npa = require('npm-package-arg') diff --git a/lib/search.js b/lib/search.js index 4a4f1f5a7..38f5a1d77 100644 --- a/lib/search.js +++ b/lib/search.js @@ -1,5 +1,3 @@ -'use strict' - const Minipass = require('minipass') const Pipeline = require('minipass-pipeline') const libSearch = require('libnpmsearch') diff --git a/lib/search/format-package-stream.js b/lib/search/format-package-stream.js index 0f75bbff7..c90860114 100644 --- a/lib/search/format-package-stream.js +++ b/lib/search/format-package-stream.js @@ -1,5 +1,3 @@ -'use strict' - // XXX these output classes should not live in here forever. it'd be good to // split them out, perhaps to libnpmsearch diff --git a/lib/search/package-filter.js b/lib/search/package-filter.js index e3d427a4a..2e7d8e82a 100644 --- a/lib/search/package-filter.js +++ b/lib/search/package-filter.js @@ -1,5 +1,3 @@ -'use strict' - module.exports = filter function filter (data, include, exclude, opts) { return typeof data === 'object' && diff --git a/lib/set-script.js b/lib/set-script.js index 4dfc67fbb..f655c2210 100644 --- a/lib/set-script.js +++ b/lib/set-script.js @@ -1,5 +1,3 @@ -'use strict' - const log = require('npmlog') const usageUtil = require('./utils/usage.js') const { localPrefix } = require('./npm.js') diff --git a/lib/shrinkwrap.js b/lib/shrinkwrap.js index 33502a560..74e129297 100644 --- a/lib/shrinkwrap.js +++ b/lib/shrinkwrap.js @@ -1,5 +1,3 @@ -'use strict' - const { resolve, basename } = require('path') const { promises: { unlink } } = require('fs') const Arborist = require('@npmcli/arborist') diff --git a/lib/star.js b/lib/star.js index 85d14d0e4..b3e72d7da 100644 --- a/lib/star.js +++ b/lib/star.js @@ -1,5 +1,3 @@ -'use strict' - const fetch = require('npm-registry-fetch') const log = require('npmlog') const npa = require('npm-package-arg') diff --git a/lib/stars.js b/lib/stars.js index 055543210..c09ca6003 100644 --- a/lib/stars.js +++ b/lib/stars.js @@ -1,5 +1,3 @@ -'use strict' - const log = require('npmlog') const fetch = require('npm-registry-fetch') diff --git a/lib/team.js b/lib/team.js index 54c9c68a3..5e88011cf 100644 --- a/lib/team.js +++ b/lib/team.js @@ -1,5 +1,3 @@ -'use strict' - const columns = require('cli-columns') const libteam = require('libnpmteam') diff --git a/lib/token.js b/lib/token.js index 7e53bd612..8809e4412 100644 --- a/lib/token.js +++ b/lib/token.js @@ -1,5 +1,3 @@ -'use strict' - const profile = require('npm-profile') const npm = require('./npm.js') const output = require('./utils/output.js') diff --git a/lib/uninstall.js b/lib/uninstall.js index 4f63abfaf..83a0b0096 100644 --- a/lib/uninstall.js +++ b/lib/uninstall.js @@ -1,5 +1,3 @@ -'use strict' - const { resolve } = require('path') const Arborist = require('@npmcli/arborist') const rpj = require('read-package-json-fast') diff --git a/lib/unpublish.js b/lib/unpublish.js index d6dbc8d6e..1d7601b60 100644 --- a/lib/unpublish.js +++ b/lib/unpublish.js @@ -1,5 +1,3 @@ -'use strict' - const path = require('path') const util = require('util') const log = require('npmlog') diff --git a/lib/update.js b/lib/update.js index dd6b0d09f..bbc6732db 100644 --- a/lib/update.js +++ b/lib/update.js @@ -1,5 +1,3 @@ -'use strict' - const path = require('path') const Arborist = require('@npmcli/arborist') diff --git a/lib/utils/child-path.js b/lib/utils/child-path.js index 4594f4322..38b9df138 100644 --- a/lib/utils/child-path.js +++ b/lib/utils/child-path.js @@ -1,4 +1,3 @@ -'use strict' var path = require('path') var validate = require('aproba') var moduleName = require('../utils/module-name.js') diff --git a/lib/utils/completion/installed-deep.js b/lib/utils/completion/installed-deep.js index 803b223ea..793f3b3e9 100644 --- a/lib/utils/completion/installed-deep.js +++ b/lib/utils/completion/installed-deep.js @@ -1,5 +1,3 @@ -'use strict' - const { resolve } = require('path') const Arborist = require('@npmcli/arborist') const npm = require('../../npm.js') diff --git a/lib/utils/deep-sort-object.js b/lib/utils/deep-sort-object.js index e7bb7365b..56f1854f1 100644 --- a/lib/utils/deep-sort-object.js +++ b/lib/utils/deep-sort-object.js @@ -1,4 +1,3 @@ -'use strict' var sortedObject = require('sorted-object') module.exports = function deepSortObject (obj) { diff --git a/lib/utils/error-handler.js b/lib/utils/error-handler.js index 476ca9e91..cb339523d 100644 --- a/lib/utils/error-handler.js +++ b/lib/utils/error-handler.js @@ -1,5 +1,3 @@ -'use strict' - let cbCalled = false const log = require('npmlog') const npm = require('../npm.js') diff --git a/lib/utils/error-message.js b/lib/utils/error-message.js index 04034243f..695b497ab 100644 --- a/lib/utils/error-message.js +++ b/lib/utils/error-message.js @@ -1,5 +1,3 @@ -'use strict' - const npm = require('../npm.js') const { format } = require('util') const { resolve } = require('path') diff --git a/lib/utils/git.js b/lib/utils/git.js index 369f15890..299302b27 100644 --- a/lib/utils/git.js +++ b/lib/utils/git.js @@ -1,5 +1,3 @@ -'use strict' - const exec = require('child_process').execFile const spawn = require('./spawn') const npm = require('../npm.js') diff --git a/lib/utils/is-windows-bash.js b/lib/utils/is-windows-bash.js index 420b4c2d4..0ae99e212 100644 --- a/lib/utils/is-windows-bash.js +++ b/lib/utils/is-windows-bash.js @@ -1,4 +1,3 @@ -'use strict' const isWindows = require('./is-windows.js') module.exports = isWindows && (/^MINGW(32|64)$/.test(process.env.MSYSTEM) || process.env.TERM === 'cygwin') diff --git a/lib/utils/is-windows-shell.js b/lib/utils/is-windows-shell.js index 5f2f95e2e..477bd43cc 100644 --- a/lib/utils/is-windows-shell.js +++ b/lib/utils/is-windows-shell.js @@ -1,4 +1,3 @@ -'use strict' const isWindows = require('./is-windows.js') const isWindowsBash = require('./is-windows-bash.js') module.exports = isWindows && !isWindowsBash diff --git a/lib/utils/is-windows.js b/lib/utils/is-windows.js index 8a991d54f..fbece90ad 100644 --- a/lib/utils/is-windows.js +++ b/lib/utils/is-windows.js @@ -1,2 +1 @@ -'use strict' module.exports = process.platform === 'win32' diff --git a/lib/utils/metrics-launch.js b/lib/utils/metrics-launch.js index c39c3fec9..4a3dcde1a 100644 --- a/lib/utils/metrics-launch.js +++ b/lib/utils/metrics-launch.js @@ -1,4 +1,3 @@ -'use strict' /* eslint-disable camelcase */ module.exports = launchSendMetrics var fs = require('graceful-fs') diff --git a/lib/utils/metrics.js b/lib/utils/metrics.js index c394f1d34..432f8dc70 100644 --- a/lib/utils/metrics.js +++ b/lib/utils/metrics.js @@ -1,4 +1,3 @@ -'use strict' exports.start = startMetrics exports.stop = stopMetrics exports.save = saveMetrics diff --git a/lib/utils/module-name.js b/lib/utils/module-name.js index 6152f1258..c58050e55 100644 --- a/lib/utils/module-name.js +++ b/lib/utils/module-name.js @@ -1,4 +1,3 @@ -'use strict' var path = require('path') module.exports = moduleName diff --git a/lib/utils/no-progress-while-running.js b/lib/utils/no-progress-while-running.js index 13c2c50e1..c2e6a01b2 100644 --- a/lib/utils/no-progress-while-running.js +++ b/lib/utils/no-progress-while-running.js @@ -1,4 +1,3 @@ -'use strict' var log = require('npmlog') var progressEnabled var running = 0 diff --git a/lib/utils/open-url.js b/lib/utils/open-url.js index 4d9de4f57..28c2d038a 100644 --- a/lib/utils/open-url.js +++ b/lib/utils/open-url.js @@ -1,4 +1,3 @@ -'use strict' const npm = require('../npm.js') const output = require('./output.js') const opener = require('opener') diff --git a/lib/utils/otplease.js b/lib/utils/otplease.js index 3210f3e91..ca271526c 100644 --- a/lib/utils/otplease.js +++ b/lib/utils/otplease.js @@ -1,5 +1,3 @@ -'use strict' - const prompt = 'This operation requires a one-time password.\nEnter OTP:' const readUserInfo = require('./read-user-info.js') diff --git a/lib/utils/pulse-till-done.js b/lib/utils/pulse-till-done.js index 215a514c8..9d145eee9 100644 --- a/lib/utils/pulse-till-done.js +++ b/lib/utils/pulse-till-done.js @@ -1,4 +1,3 @@ -'use strict' const validate = require('aproba') const log = require('npmlog') diff --git a/lib/utils/read-local-package.js b/lib/utils/read-local-package.js index 91a1e3a5b..7ab130c1f 100644 --- a/lib/utils/read-local-package.js +++ b/lib/utils/read-local-package.js @@ -1,5 +1,3 @@ -'use strict' - const { resolve } = require('path') const readJson = require('read-package-json-fast') const npm = require('../npm.js') diff --git a/lib/utils/read-user-info.js b/lib/utils/read-user-info.js index 9977d2d60..b0166e18c 100644 --- a/lib/utils/read-user-info.js +++ b/lib/utils/read-user-info.js @@ -1,4 +1,3 @@ -'use strict' const { promisify } = require('util') const readAsync = promisify(require('read')) const userValidate = require('npm-user-validate') diff --git a/lib/utils/replace-info.js b/lib/utils/replace-info.js index e3e324c88..7c7489bc1 100644 --- a/lib/utils/replace-info.js +++ b/lib/utils/replace-info.js @@ -1,5 +1,3 @@ -'use strict' - const URL = require('url').URL // replaces auth info in an array of arguments or in a strings diff --git a/lib/utils/usage.js b/lib/utils/usage.js index 636914061..ddcbd708b 100644 --- a/lib/utils/usage.js +++ b/lib/utils/usage.js @@ -1,4 +1,3 @@ -'use strict' var aliases = require('../utils/cmd-list').aliases module.exports = function usage (cmd, txt, opt) { diff --git a/lib/version.js b/lib/version.js index abdd8d552..a96f5d605 100644 --- a/lib/version.js +++ b/lib/version.js @@ -1,5 +1,3 @@ -'use strict' - const libversion = require('libnpmversion') const npm = require('./npm.js') const output = require('./utils/output.js') |