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( ...@@ -154,8 +154,6 @@ export async function runLintCheck(
baseDir, baseDir,
false, false,
true, true,
eslintrcFile ?? '',
!!packageJsonConfig.eslintConfig,
lintDuringBuild lintDuringBuild
) )
......
import chalk from 'chalk' import chalk from 'chalk'
import { basename, join } from 'path' import { join } from 'path'
import { fileExists } from './file-exists' import { fileExists } from './file-exists'
import { getOxfordCommaList } from './oxford-comma-list' import { getOxfordCommaList } from './oxford-comma-list'
...@@ -24,8 +24,6 @@ export async function hasNecessaryDependencies( ...@@ -24,8 +24,6 @@ export async function hasNecessaryDependencies(
baseDir: string, baseDir: string,
checkTSDeps: boolean, checkTSDeps: boolean,
checkESLintDeps: boolean, checkESLintDeps: boolean,
eslintrcFile: string = '',
pkgJsonEslintConfig: boolean = false,
lintDuringBuild: boolean = false lintDuringBuild: boolean = false
): Promise<NecessaryDependencies> { ): Promise<NecessaryDependencies> {
if (!checkTSDeps && !checkESLintDeps) { if (!checkTSDeps && !checkESLintDeps) {
...@@ -70,15 +68,7 @@ export async function hasNecessaryDependencies( ...@@ -70,15 +68,7 @@ export async function hasNecessaryDependencies(
const removalLintMsg = const removalLintMsg =
`\n\n` + `\n\n` +
(lintDuringBuild (lintDuringBuild
? `If you do not want to run ESLint during builds, ` + ? `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.`
(!!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.'
: `Once installed, run ${chalk.bold.cyan('next lint')} again.`) : `Once installed, run ${chalk.bold.cyan('next lint')} again.`)
const removalMsg = checkTSDeps ? removalTSMsg : removalLintMsg 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