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: no-unused-vars #7455

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
5 changes: 3 additions & 2 deletions workspaces/config/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ class Config {
}
}

#checkDeprecated (key, where, obj, kv) {
#checkDeprecated (key) {
// XXX(npm9+) make this throw an error
if (this.deprecated[key]) {
log.warn('config', key, this.deprecated[key])
Expand Down Expand Up @@ -739,7 +739,7 @@ class Config {
const iniData = ini.stringify(conf.raw).trim() + '\n'
if (!iniData.trim()) {
// ignore the unlink error (eg, if file doesn't exist)
await unlink(conf.source).catch(er => {})
await unlink(conf.source).catch(() => {})
return
}
const dir = dirname(conf.source)
Expand Down Expand Up @@ -778,6 +778,7 @@ class Config {
const nerfed = nerfDart(uri)

// email is either provided, a top level key, or nothing
// eslint-disable-next-line no-unused-vars -- this might be a bug?
email = email || this.get('email', 'user')

// field that hasn't been used as documented for a LONG time,
Expand Down
2 changes: 1 addition & 1 deletion workspaces/libnpmdiff/lib/tarball.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const tar = require('tar')

// returns a simplified tarball when reading files from node_modules folder,
// thus avoiding running the prepare scripts and the extra logic from packlist
const nodeModulesTarball = (manifest, opts) =>
const nodeModulesTarball = (manifest) =>
pkgContents({ path: manifest._resolved, depth: 1 })
.then(files =>
files.map(file => relative(manifest._resolved, file))
Expand Down
2 changes: 1 addition & 1 deletion workspaces/libnpmfund/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function readTree (tree, opts) {
})

return directDepsWithFunding.reduce(
(res, { node, fundingItem }, i) => {
(res, { node, fundingItem }) => {
if (!fundingItem ||
fundingItem.length === 0 ||
!node) {
Expand Down
2 changes: 1 addition & 1 deletion workspaces/libnpmversion/test/retrieve-tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const requireInject = require('require-inject')
let tag
const retrieveTag = requireInject('../lib/retrieve-tag.js', {
'@npmcli/git': {
spawn: async (cmd, opts) => ({ stdout: tag + '\n' }),
spawn: async () => ({ stdout: tag + '\n' }),
},
})

Expand Down
Loading