ESLint: Updates disable ESLint message during builds (#25917)
Fix per review comment on [#25895](https://github.com/vercel/next.js/pull/25895#discussion_r647736514)
This commit is contained in:
parent
ce4e1afba4
commit
90c64435dd
2 changed files with 2 additions and 14 deletions
|
@ -154,8 +154,6 @@ export async function runLintCheck(
|
|||
baseDir,
|
||||
false,
|
||||
true,
|
||||
eslintrcFile ?? '',
|
||||
!!packageJsonConfig.eslintConfig,
|
||||
lintDuringBuild
|
||||
)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import chalk from 'chalk'
|
||||
import { basename, join } from 'path'
|
||||
import { join } from 'path'
|
||||
|
||||
import { fileExists } from './file-exists'
|
||||
import { getOxfordCommaList } from './oxford-comma-list'
|
||||
|
@ -24,8 +24,6 @@ export async function hasNecessaryDependencies(
|
|||
baseDir: string,
|
||||
checkTSDeps: boolean,
|
||||
checkESLintDeps: boolean,
|
||||
eslintrcFile: string = '',
|
||||
pkgJsonEslintConfig: boolean = false,
|
||||
lintDuringBuild: boolean = false
|
||||
): Promise<NecessaryDependencies> {
|
||||
if (!checkTSDeps && !checkESLintDeps) {
|
||||
|
@ -70,15 +68,7 @@ export async function hasNecessaryDependencies(
|
|||
const removalLintMsg =
|
||||
`\n\n` +
|
||||
(lintDuringBuild
|
||||
? `If you do not want to run ESLint during builds, ` +
|
||||
(!!eslintrcFile
|
||||
? `remove the ${chalk.bold(
|
||||
basename(eslintrcFile)
|
||||
)} file from your package root`
|
||||
: pkgJsonEslintConfig
|
||||
? `remove the ${chalk.bold('eslintConfig')} field from package.json`
|
||||
: '') +
|
||||
' or disable it in next.config.js.\n\nSee https://nextjs.org/docs/api-reference/next.config.js/ignoring-eslint.'
|
||||
? `If you do not want to run ESLint during builds, disable it in next.config.js. See https://nextjs.org/docs/api-reference/next.config.js/ignoring-eslint.`
|
||||
: `Once installed, run ${chalk.bold.cyan('next lint')} again.`)
|
||||
const removalMsg = checkTSDeps ? removalTSMsg : removalLintMsg
|
||||
|
||||
|
|
Loading…
Reference in a new issue