Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint: Updates disable ESLint message during builds #25917

Merged
merged 1 commit into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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