Skip to content

Commit

Permalink
fix(next): eslint v9 not picking up config (#71298)
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi authored Oct 15, 2024
1 parent b14b0ff commit e68ce6e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/next/src/lib/eslint/runLintCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,11 @@ async function lint(

const mod = await Promise.resolve(require(deps.resolved.get('eslint')!))

const useFlatConfig =
// If V9 config was found, use flat config, or else use legacy.
eslintrcFile?.startsWith('eslint.config.')
// If V9 config was found, use flat config, or else use legacy.
const useFlatConfig = eslintrcFile
? // eslintrcFile is absolute path
path.basename(eslintrcFile).startsWith('eslint.config.')
: false

let ESLint
// loadESLint is >= 8.57.0
Expand Down

0 comments on commit e68ce6e

Please sign in to comment.