Migrate ESLint to flat config for Next 16#8
Merged
Conversation
- next lint was removed in Next 16; switch the lint script to 'eslint .'. - Replace legacy .eslintrc.json with eslint.config.mjs (ESLint 9 flat config), importing eslint-config-next@16's native flat-config array directly (no FlatCompat, which choked on circular plugin refs). Adds ignores for build output, the Python backend, ml_training, venv, and archived code. - Fix 7 react/no-unescaped-entities errors so 'npm run lint' exits clean (12 pre-existing warnings remain: <img> usage and exhaustive-deps). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
npm run lintwas broken on two fronts after the Next 16 upgrade:next lintwas removed in Next 16 — it parsedlintas a directory path and errored..eslintrc.json(extends: next/core-web-vitals) is incompatible with ESLint 9's flat config;FlatCompatthrewConverting circular structure to JSONoneslint-config-next@16.Fix
lintscript →eslint ...eslintrc.jsonwitheslint.config.mjs(ESLint 9 flat config).eslint-config-next@16ships native flat-config arrays, so we importeslint-config-next/core-web-vitalsand spread it directly (noFlatCompat). Addsignoresfor build output, the Python backend,ml_training,venv, and archived code.react/no-unescaped-entitieserrors so lint exits clean.Verification
npm run lint→ exit 0 (0 errors; 12 pre-existing warnings remain:<img>usage +react-hooks/exhaustive-deps).npx tsc --noEmit→ 0 errors.🤖 Generated with Claude Code