Use the npx @eslint/migrate-config .eslintrc.json command.

It produces ugly output, but seems to work - I assume we will eventually be able to do it as recommended in the eslint docs.

Heres the output I got (placed inside eslint.config.mjs file).

import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
    baseDirectory: __dirname,
    recommendedConfig: js.configs.recommended,
    allConfig: js.configs.all
});
export default [...compat.extends("next")];
🌐
Next.js
nextjs.org › docs › app › api-reference › config › eslint
Configuration: ESLint | Next.js
2 weeks ago - It includes the @next/eslint-plugin-next plugin along with recommended rule-sets from eslint-plugin-react and eslint-plugin-react-hooks. ... eslint-config-next: Base configuration with Next.js, React, and React Hooks rules.
🌐
npm
npmjs.com › package › eslint-config-next
eslint-config-next - npm
9 Dependencies · 1677 Dependents · 2,564 Versions · This package does not have a README. Add a README to your package so that users know how to get started. none · Share feedback · npm i eslint-config-next · github.com/vercel/next.js · nextjs.org/docs/app/api-reference/config/eslint ·
      » npm install eslint-config-next
    
Published   Jan 27, 2026
Version   16.1.6
🌐
Medium
blog.linotte.dev › eslint-9-next-js-935c2b6d0371
Next.js & ESLint 9 Setup Guide | Linotte Blog
October 14, 2024 - Created my-app at ./my-app · $ ... · In April of 2024, ESLint released v9.0.0, a new major version. Flat config is now the default configuration, which is a big structural change for ESLint users, plugin developers, and ...
🌐
GitHub
github.com › vercel › next.js › issues › 64409
next-lint Doesn't Support ESLint 9 · Issue #64409 · vercel/next.js
March 11, 2024 - Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023 Available memory (MB): 4102 Available CPU cores: 2 Binaries: Node: 20.9.0 npm: 9.8.1 Yarn: 1.22.19 pnpm: 8.10.2 Relevant Packages: next: 14.2.1-canary.0 // Latest available version is detected (14.2.1-canary.0). eslint-config-next: 14.1.4 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 Next.js Config: output: N/A
Published   Apr 12, 2024
Find elsewhere
🌐
ESLint
eslint.org › docs › latest › use › migrate-to-9.0.0
Migrate to v9.x - ESLint - Pluggable JavaScript Linter
If you are accessing the nextSegments, prevSegments, allNextSegments, or allPrevSegments properties on a CodePathSegment, or CodePath#childCodePaths, verify that your code will still work as expected.
🌐
Chris
chris.lu › web_development › tutorials › next-js-static-first-mdx-starterkit › linting-setup-using-eslint
Linting setup using ESLint 9 flat config - Next.js 15 Tutorial
In ESLint v9 the eslintrc files are deprecated, support for eslintrc (classic) configuration files will be removed in ESLint version 10.0.0 ... if Next.js detects that you are still using ESLint v8 they automatically set the ESLINT_USE_FLAT_CONFIG=false flag, which enables support for flat config files in ESLint v8
🌐
Chris
chris.lu › web_development › tutorials › next-js-16-linting-setup-eslint-9-flat-config
Next.js 16 Linting setup using ESLint 9 flat config | chris.lu
Setting up proper linting in your Next.js 16 project is crucial for maintaining code quality and consistency. This comprehensive guide walks you through configuring ESLint 9 with the modern flat config format, including support for TypeScript, React, MDX, and various ESLint plugins.
🌐
Medium
medium.com › @wahvanessa22 › im-setting-up-eslint-for-my-next-js-a6f22ebf768b
I'm setting up ESLint for my Next.js + TypeScript project to keep my code clean, consistent, and bug-free. A step you should consider when writing like a pro! | by Wah Vanessa | Medium
May 13, 2025 - { "name": "mytest", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", }, "dependencies": { "@next/eslint-plugin-next": "^15.3.2", "lucide-react": "^0.508.0", "next": "15.3.2", "react": "^19.0.0", "react-dom": "^19.0.0" }, "devDependencies": { "@eslint/eslintrc": "^3", "@eslint/js": "^9.26.0", "@types/node": "^20", "@types/react": "^19", "@types/react-dom": "^19", "eslint": "^9.26.0", "eslint-config-next": "15.3.2", "globals": "^16.1.0", "typescript": "^5", "typescript-eslint": "^8.32.0" } } Next, in your generated eslint.config.mjs, do the following configurations.
🌐
Reddit
reddit.com › r/nextjs › comprehensive nextjs eslint config for eslint 9
r/nextjs on Reddit: Comprehensive NextJS Eslint Config for Eslint 9
December 22, 2024 - I hate pissing around with lint configs. If they keep it going and up to date could see a lot users jumping on board. ... Chat about javascript and javascript related projects. Yes, typescript counts. Please keep self promotion to a minimum/reasonable level. ... Eslint issues when using create-next-app --use-pnpm are driving me crazy!
🌐
GitHub
github.com › vercel › next.js › issues › 64853
eslint-config-next to have eslint ^9.x.x+ as peerDependencies
April 22, 2024 - npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: @typescript-eslint/parser@6.21.0 npm WARN Found: eslint@9.1.0 npm WARN node_modules/eslint npm WARN dev eslint@"^9.0.0" from the root project npm WARN 2 more (@eslint-community/eslint-utils, eslint-import-resolver-typescript) npm WARN npm WARN Could not resolve dependency: npm WARN peer eslint@"^7.0.0 || ^8.0.0" from @typescript-eslint/parser@6.21.0 npm WARN node_modules/@typescript-eslint/parser npm WARN @typescript-eslint/parser@"^5.4.2 || ^6.0.0 || 7.0.0 - 7.2.0" from eslint-config-next@14.2.2 npm WARN node_modules/eslin
Published   Apr 22, 2024
🌐
GitHub
gist.github.com › ixahmedxi › 9d87c66a8245ca02a0f81b6ccb58a825
ESLint v9 Next.js · GitHub
I couldn't get this to work with NextJS 14.2.7. Do you have any recommendations? ... ESLint 9 is supported as of the Next.js 15 RC 2.
🌐
npm
npmjs.com › package › @next › eslint-plugin-next
@next/eslint-plugin-next - npm
ESLint plugin for Next.js.. Latest version: 16.1.6, last published: a month ago. Start using @next/eslint-plugin-next in your project by running `npm i @next/eslint-plugin-next`. There are 650 other projects in the npm registry using @next/eslint-plugin-next.
      » npm install @next/eslint-plugin-next
    
Published   Jan 27, 2026
Version   16.1.6
🌐
DEV Community
dev.to › jordanahaines › just-use-this-nextjs-eslint-configuration-540
Just use this Next.js Eslint Configuration - DEV Community
January 12, 2025 - Because I couldn't easily extend this deprecated configuration, I (swore and then) scrapped it and initialized a new eslint config with npm init @eslint/config@latest. I then added the configuration for next wrapped with eslint's flat compat utility.
🌐
Reddit
reddit.com › r/nextjs › eslint-config-next v1.7
r/nextjs on Reddit: eslint-config-next V1.7
March 12, 2025 - Hi all, I want to draw your attention to my package: https://github.com/Goldziher/eslint-config-next This is a comprehensive EsLint 9 (flat config)…
🌐
GitHub
github.com › vercel › next.js › blob › canary › packages › eslint-config-next › package.json
next.js/packages/eslint-config-next/package.json at canary · vercel/next.js
"@next/eslint-plugin-next": "16.2.0-canary.60", "eslint-import-resolver-node": "^0.3.6", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.32.0", "eslint-plugin-jsx-a11y": "^6.10.0", "eslint-plugin-react": "^7.37.0", "eslint-plugin-react-hooks": "^7.0.0", "globals": "16.4.0", "typescript-eslint": "^8.46.0" }, "peerDependencies": { "eslint": ">=9.0.0", "typescript": ">=3.3.1" }, "peerDependenciesMeta": { "typescript": { "optional": true ·
Author   vercel