Skip to content

Commit

Permalink
fix: allow next lint without eslint-config-next installed (#29823)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst committed Nov 16, 2021
1 parent d8028f5 commit f195650
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/next/lib/eslint/runLintCheck.ts
Expand Up @@ -200,12 +200,13 @@ async function lint(
eslintVersion: eslintVersion,
lintedFilesCount: results.length,
lintFix: !!options.fix,
nextEslintPluginVersion: nextEslintPluginIsEnabled
? require(path.join(
path.dirname(deps.resolved.get('eslint-config-next')!),
'package.json'
)).version
: null,
nextEslintPluginVersion:
nextEslintPluginIsEnabled && deps.resolved.has('eslint-config-next')
? require(path.join(
path.dirname(deps.resolved.get('eslint-config-next')!),
'package.json'
)).version
: null,
nextEslintPluginErrorsCount: formattedResult.totalNextPluginErrorCount,
nextEslintPluginWarningsCount:
formattedResult.totalNextPluginWarningCount,
Expand Down

0 comments on commit f195650

Please sign in to comment.