+51
-51
lines changedFilter options
+51
-51
lines changed Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ const removed = new Set([
26
26
27
27
const { definitions, shorthands } = require('@npmcli/config/lib/definitions')
28
28
const npmSwitches = Object.entries(definitions)
29
-
.filter(([key, { type }]) => type === Boolean ||
29
+
.filter(([, { type }]) => type === Boolean ||
30
30
(Array.isArray(type) && type.includes(Boolean)))
31
31
.map(([key]) => key)
32
32
Original file line number Diff line number Diff line change
@@ -119,7 +119,7 @@ const replaceConfig = (src, { path }) => {
119
119
}
120
120
121
121
const allConfig = Object.entries(definitions).sort(sort)
122
-
.map(([_, def]) => def.describe())
122
+
.map(([, def]) => def.describe())
123
123
.join('\n\n')
124
124
125
125
return src.replace(replacer, allConfig)
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ class AddUser extends BaseCommand {
12
12
'auth-type',
13
13
]
14
14
15
-
async exec (args) {
15
+
async exec () {
16
16
const scope = this.npm.config.get('scope')
17
17
let registry = this.npm.config.get('registry')
18
18
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ class CI extends ArboristWorkspaceCmd {
81
81
await time.start('npm-ci:rm', async () => {
82
82
const path = `${where}/node_modules`
83
83
// get the list of entries so we can skip the glob for performance
84
-
const entries = await fs.readdir(path, null).catch(er => [])
84
+
const entries = await fs.readdir(path, null).catch(() => [])
85
85
return Promise.all(entries.map(f => fs.rm(`${path}/${f}`,
86
86
{ force: true, recursive: true })))
87
87
})
Original file line number Diff line number Diff line change
@@ -248,7 +248,7 @@ const configCompl = opts => {
248
248
249
249
// expand with the valid values of various config values.
250
250
// not yet implemented.
251
-
const configValueCompl = opts => []
251
+
const configValueCompl = () => []
252
252
253
253
// check if the thing is a flag or not.
254
254
const isFlag = word => {
@@ -265,7 +265,7 @@ const isFlag = word => {
265
265
266
266
// complete against the npm commands
267
267
// if they all resolve to the same thing, just return the thing it already is
268
-
const cmdCompl = (opts, npm) => {
268
+
const cmdCompl = (opts) => {
269
269
const allCommands = commands.concat(Object.keys(aliases))
270
270
const matches = allCommands.filter(c => c.startsWith(opts.partialWord))
271
271
if (!matches.length) {
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ class Dedupe extends ArboristWorkspaceCmd {
21
21
...super.params,
22
22
]
23
23
24
-
async exec (args) {
24
+
async exec () {
25
25
if (this.npm.global) {
26
26
const er = new Error('`npm dedupe` does not work in global mode.')
27
27
er.code = 'EDEDUPEGLOBAL'
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ class Diff extends BaseCommand {
78
78
79
79
// get the package name from the packument at `path`
80
80
// throws if no packument is present OR if it does not have `name` attribute
81
-
async packageName (path) {
81
+
async packageName () {
82
82
let name
83
83
try {
84
84
const { content: pkg } = await pkgJson.normalize(this.prefix)
@@ -103,7 +103,7 @@ class Diff extends BaseCommand {
103
103
// no arguments, defaults to comparing cwd
104
104
// to its latest published registry version
105
105
if (!a) {
106
-
const pkgName = await this.packageName(this.prefix)
106
+
const pkgName = await this.packageName()
107
107
return [
108
108
`${pkgName}@${this.npm.config.get('tag')}`,
109
109
`file:${this.prefix.replace(/#/g, '%23')}`,
Original file line number Diff line number Diff line change
@@ -254,7 +254,7 @@ class Doctor extends BaseCommand {
254
254
}
255
255
256
256
if (st.isDirectory()) {
257
-
const entries = await readdir(f).catch(er => {
257
+
const entries = await readdir(f).catch(() => {
258
258
ok = false
259
259
log.warn('doctor', 'checkFilesPermission', 'error reading directory ' + f)
260
260
return []
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ class FindDupes extends ArboristWorkspaceCmd {
19
19
...super.params,
20
20
]
21
21
22
-
async exec (args) {
22
+
async exec () {
23
23
this.npm.config.set('dry-run', true)
24
24
return this.npm.exec('dedupe', [])
25
25
}
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ class HelpSearch extends BaseCommand {
22
22
// preserve glob@8 behavior
23
23
files = files.sort((a, b) => a.localeCompare(b, 'en'))
24
24
const data = await this.readFiles(files)
25
-
const results = await this.searchFiles(args, data, files)
25
+
const results = await this.searchFiles(args, data)
26
26
const formatted = this.formatResults(args, results)
27
27
if (!formatted.trim()) {
28
28
output.standard(`No matches in help for: ${args.join(' ')}\n`)
@@ -40,7 +40,7 @@ class HelpSearch extends BaseCommand {
40
40
return res
41
41
}
42
42
43
-
async searchFiles (args, data, files) {
43
+
async searchFiles (args, data) {
44
44
const results = []
45
45
for (const [file, content] of Object.entries(data)) {
46
46
const lowerCase = content.toLowerCase()
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4