Skip to content

Commit 716b5fa

Browse files
committed
fix(linting): no-unused-vars
1 parent a1b95eb commit 716b5fa

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

workspaces/config/lib/index.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ class Config {
557557
const k = envReplace(key, this.env)
558558
const v = this.parseField(value, k)
559559
if (where !== 'default') {
560-
this.#checkDeprecated(k, where, obj, [key, value])
560+
this.#checkDeprecated(k)
561561
if (this.definitions[key]?.exclusive) {
562562
for (const exclusive of this.definitions[key].exclusive) {
563563
if (!this.isDefault(exclusive)) {
@@ -571,7 +571,7 @@ class Config {
571571
}
572572
}
573573

574-
#checkDeprecated (key, where, obj, kv) {
574+
#checkDeprecated (key) {
575575
// XXX(npm9+) make this throw an error
576576
if (this.deprecated[key]) {
577577
log.warn('config', key, this.deprecated[key])
@@ -777,9 +777,6 @@ class Config {
777777
setCredentialsByURI (uri, { token, username, password, email, certfile, keyfile }) {
778778
const nerfed = nerfDart(uri)
779779

780-
// email is either provided, a top level key, or nothing
781-
email = email || this.get('email', 'user')
782-
783780
// field that hasn't been used as documented for a LONG time,
784781
// and as of npm 7.10.0, isn't used at all. We just always
785782
// send auth if we have it, only to the URIs under the nerf dart.

workspaces/libnpmdiff/lib/tarball.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const tar = require('tar')
99

1010
// returns a simplified tarball when reading files from node_modules folder,
1111
// thus avoiding running the prepare scripts and the extra logic from packlist
12-
const nodeModulesTarball = (manifest, opts) =>
12+
const nodeModulesTarball = (manifest) =>
1313
pkgContents({ path: manifest._resolved, depth: 1 })
1414
.then(files =>
1515
files.map(file => relative(manifest._resolved, file))

workspaces/libnpmfund/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function readTree (tree, opts) {
133133
})
134134

135135
return directDepsWithFunding.reduce(
136-
(res, { node, fundingItem }, i) => {
136+
(res, { node, fundingItem }) => {
137137
if (!fundingItem ||
138138
fundingItem.length === 0 ||
139139
!node) {

workspaces/libnpmversion/test/retrieve-tag.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const requireInject = require('require-inject')
33
let tag
44
const retrieveTag = requireInject('../lib/retrieve-tag.js', {
55
'@npmcli/git': {
6-
spawn: async (cmd, opts) => ({ stdout: tag + '\n' }),
6+
spawn: async () => ({ stdout: tag + '\n' }),
77
},
88
})
99

0 commit comments

Comments
 (0)