Skip to content

Commit

Permalink
ESLint: Updates disable ESLint message during builds (#25917)
Browse files Browse the repository at this point in the history
Fix per review comment on [#25895](#25895 (comment))
  • Loading branch information
housseindjirdeh committed Jun 9, 2021
1 parent ce4e1af commit 90c6443
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
2 changes: 0 additions & 2 deletions packages/next/lib/eslint/runLintCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ export async function runLintCheck(
baseDir,
false,
true,
eslintrcFile ?? '',
!!packageJsonConfig.eslintConfig,
lintDuringBuild
)

Expand Down
14 changes: 2 additions & 12 deletions packages/next/lib/has-necessary-dependencies.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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) {
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 90c6443

Please sign in to comment.