Skip to content

Commit 946fba0

Browse files
committed
fix: remove max-len linting bypasses
1 parent 38ca6d6 commit 946fba0

24 files changed

+4
-100
lines changed

lib/base-cmd.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ class BaseCommand {
124124
} else if (!this.npm.config.isDefault('expect-result-count')) {
125125
const expected = this.npm.config.get('expect-result-count')
126126
if (expected !== entries) {
127-
/* eslint-disable-next-line max-len */
128127
log.warn(this.name, `Expected ${expected} result${expected === 1 ? '' : 's'}, got ${entries}`)
129128
process.exitCode = 1
130129
}

lib/cli/entry.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable max-len */
2-
31
// Separated out for easier unit testing
42
module.exports = async (process, validateEngines) => {
53
// set it here so that regardless of what happens later, we don't

lib/cli/validate-engines.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ const npm = `v${version}`
1111
module.exports = (process, getCli) => {
1212
const node = process.version
1313

14-
/* eslint-disable-next-line max-len */
1514
const unsupportedMessage = `npm ${npm} does not support Node.js ${node}. This version of npm supports the following node versions: \`${engines}\`. You can find the latest version at https://nodejs.org/.`
1615

17-
/* eslint-disable-next-line max-len */
1816
const brokenMessage = `ERROR: npm ${npm} is known not to run on Node.js ${node}. This version of npm supports the following node versions: \`${engines}\`. You can find the latest version at https://nodejs.org/.`
1917

2018
// coverage ignored because this is only hit in very unsupported node versions

lib/commands/cache.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const localeCompare = require('@isaacs/string-locale-compare')('en')
1010
const { log, output } = require('proc-log')
1111

1212
const searchCachePackage = async (path, parsed, cacheKeys) => {
13-
/* eslint-disable-next-line max-len */
1413
const searchMFH = new RegExp(`^make-fetch-happen:request-cache:.*(?<!/[@a-zA-Z]+)/${parsed.name}/-/(${parsed.name}[^/]+.tgz)$`)
1514
const searchPack = new RegExp(`^make-fetch-happen:request-cache:.*/${parsed.escapedName}$`)
1615
const results = new Set()
@@ -181,7 +180,6 @@ class Cache extends BaseCommand {
181180
output.standard(`Corrupted content removed: ${stats.badContentCount}`)
182181
}
183182
if (stats.reclaimedCount) {
184-
/* eslint-disable-next-line max-len */
185183
output.standard(`Content garbage-collected: ${stats.reclaimedCount} (${stats.reclaimedSize} bytes)`)
186184
}
187185
if (stats.missingContent) {

lib/commands/doctor.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ class Doctor extends BaseCommand {
128128

129129
if (!allOk) {
130130
if (this.npm.silent) {
131-
/* eslint-disable-next-line max-len */
132131
throw new Error('Some problems found. Check logs or disable silent mode for recommendations.')
133132
} else {
134133
throw new Error('Some problems found. See above for recommendations.')

lib/commands/install.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ class Install extends ArboristWorkspaceCmd {
115115
if (forced) {
116116
log.warn(
117117
'install',
118-
/* eslint-disable-next-line max-len */
119118
`Forcing global npm install with incompatible version ${npmManifest.version} into node ${process.version}`
120119
)
121120
} else {

lib/commands/org.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class Org extends BaseCommand {
6161

6262
if (!['owner', 'admin', 'developer'].find(x => x === role)) {
6363
throw new Error(
64-
/* eslint-disable-next-line max-len */
6564
'Third argument `role` must be one of `owner`, `admin`, or `developer`, with `developer` being the default value if omitted.'
6665
)
6766
}

lib/commands/publish.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class Publish extends BaseCommand {
6161
if (err.code !== 'EPRIVATE') {
6262
throw err
6363
}
64-
// eslint-disable-next-line max-len
6564
log.warn('publish', `Skipping workspace ${this.npm.chalk.cyan(name)}, marked as ${this.npm.chalk.bold('private')}`)
6665
}
6766
}
@@ -161,7 +160,6 @@ class Publish extends BaseCommand {
161160
const latestSemverIsGreater = !!latestVersion && semver.gte(latestVersion, manifest.version)
162161

163162
if (latestSemverIsGreater && isDefaultTag) {
164-
/* eslint-disable-next-line max-len */
165163
throw new Error(`Cannot implicitly apply the "latest" tag because published version ${latestVersion} is higher than the new version ${manifest.version}. You must specify a tag using --tag.`)
166164
}
167165

@@ -238,7 +236,6 @@ class Publish extends BaseCommand {
238236
const changes = []
239237
const pkg = await pkgJson.fix(spec.fetchSpec, { changes })
240238
if (changes.length && logWarnings) {
241-
/* eslint-disable-next-line max-len */
242239
log.warn('publish', 'npm auto-corrected some errors in your package.json when publishing. Please run "npm pkg fix" to address these errors.')
243240
log.warn('publish', `errors corrected:\n${changes.join('\n')}`)
244241
}

lib/commands/sbom.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class SBOM extends BaseCommand {
2727
const packageLockOnly = this.npm.config.get('package-lock-only')
2828

2929
if (!sbomFormat) {
30-
/* eslint-disable-next-line max-len */
3130
throw this.usageError(`Must specify --sbom-format flag with one of: ${SBOM_FORMATS.join(', ')}.`)
3231
}
3332

@@ -40,7 +39,6 @@ class SBOM extends BaseCommand {
4039
const arb = new Arborist(opts)
4140

4241
const tree = packageLockOnly ? await arb.loadVirtual(opts).catch(() => {
43-
/* eslint-disable-next-line max-len */
4442
throw this.usageError('A package lock or shrinkwrap file is required in package-lock-only mode')
4543
}) : await arb.loadActual(opts)
4644

lib/commands/token.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ class Token extends BaseCommand {
7373
for (const token of tokens) {
7474
const level = token.readonly ? 'Read only token' : 'Publish token'
7575
const created = String(token.created).slice(0, 10)
76-
/* eslint-disable-next-line max-len */
7776
output.standard(`${chalk.blue(level)} ${token.token}… with id ${chalk.cyan(token.id)} created ${created}`)
7877
if (token.cidr_whitelist) {
7978
output.standard(`with IP whitelist: ${chalk.green(token.cidr_whitelist.join(','))}`)
@@ -99,7 +98,6 @@ class Token extends BaseCommand {
9998
toRemove.push(matches[0].key)
10099
} else if (matches.length > 1) {
101100
throw new Error(
102-
/* eslint-disable-next-line max-len */
103101
`Token ID "${id}" was ambiguous, a new token may have been created since you last ran \`npm token list\`.`
104102
)
105103
} else {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy