Skip to content

Commit 3ec86a0

Browse files
authored
fix(linting): no-unused-vars (#7456)
1 parent f76e769 commit 3ec86a0

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

workspaces/config/lib/index.js

Lines changed: 4 additions & 7 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])
@@ -739,7 +739,7 @@ class Config {
739739
const iniData = ini.stringify(conf.raw).trim() + '\n'
740740
if (!iniData.trim()) {
741741
// ignore the unlink error (eg, if file doesn't exist)
742-
await unlink(conf.source).catch(er => {})
742+
await unlink(conf.source).catch(() => {})
743743
return
744744
}
745745
const dir = dirname(conf.source)
@@ -774,12 +774,9 @@ class Config {
774774
this.delete(`${nerfed}:keyfile`, level)
775775
}
776776

777-
setCredentialsByURI (uri, { token, username, password, email, certfile, keyfile }) {
777+
setCredentialsByURI (uri, { token, username, password, 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)