Unverified Commit 3b24c347 authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

hotfix(next):`next lint` installs `eslint@9` which includes breaking changes (#64141)

This is a hotfix since it breaks `next lint`, I'll start to implement
eslint v9 for canary.

x-ref: #64114
x-ref: [eslint v9
release](https://github.com/eslint/eslint/releases/tag/v9.0.0)
Fixes #64136

---------
Co-authored-by: 's avatarZack Tanner <zacktanner@gmail.com>
parent acaf642f
...@@ -369,8 +369,16 @@ export async function runLintCheck( ...@@ -369,8 +369,16 @@ export async function runLintCheck(
} else { } else {
// Check if necessary deps installed, and install any that are missing // Check if necessary deps installed, and install any that are missing
deps = await hasNecessaryDependencies(baseDir, requiredPackages) deps = await hasNecessaryDependencies(baseDir, requiredPackages)
if (deps.missing.length > 0) if (deps.missing.length > 0) {
deps.missing.forEach((dep) => {
if (dep.pkg === 'eslint') {
// eslint v9 has breaking changes, so lock to 8 until dependency plugins fully support v9.
dep.pkg = 'eslint@^8'
}
})
await installDependencies(baseDir, deps.missing, true) await installDependencies(baseDir, deps.missing, true)
}
// Write default ESLint config. // Write default ESLint config.
// Check for /pages and src/pages is to make sure this happens in Next.js folder // Check for /pages and src/pages is to make sure this happens in Next.js folder
......
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