Unverified Commit 90c64435 authored by Houssein Djirdeh's avatar Houssein Djirdeh Committed by GitHub

ESLint: Updates disable ESLint message during builds (#25917)

Fix per review comment on [#25895](https://github.com/vercel/next.js/pull/25895#discussion_r647736514)
parent ce4e1afb
......@@ -154,8 +154,6 @@ export async function runLintCheck(
baseDir,
false,
true,
eslintrcFile ?? '',
!!packageJsonConfig.eslintConfig,
lintDuringBuild
)
......
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment