chore(eslint): migrate to ESLint 10 flat config#148
Merged
Conversation
- Bump eslint 8 -> 10.3.0 and typescript-eslint 7 -> 8.59.2 - Replace .eslintrc.json with eslint.config.mjs (flat config) - Drop eslint-config-next (drags eslint-plugin-react@7, no ESLint 10 support); wire @next/eslint-plugin-next directly per Vercel's docs - Add @eslint-react/eslint-plugin and eslint-plugin-import-x for ESLint 10 native React + import rules - Bump eslint-config-prettier 9 -> 10.1.8, eslint-plugin-prettier 4 -> 5.5.5, eslint-plugin-react-hooks 4 -> 7.1.1 - Add globals 16.4.0 for browser/node env (previously implicit via eslint-config-next) - Delete .eslintignore (folded into flat config ignores) - Switch lint script from `next lint` to `eslint .` (Next 14 does not detect flat config; flat-config detection landed in Next 15)
- useMemo -> useEffect for side-effect-only hooks in 3 deck.gl layer components (real bug: useMemo was being used for setState side effects) - Remove redundant `!!foo ? a : b` boolean casts (no-extra-boolean-cast) - Hoist `info?.layer?.props` in map provider to satisfy no-unsafe-optional-chaining - Empty interface -> type alias in Command UI primitive (no-empty-object-type) - Drop orphaned `eslint-disable @typescript-eslint/no-var-requires` comments (rule renamed to no-require-imports in v8; CommonJS files handled via per-file override in eslint.config.mjs)
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Extract named layer consts (nextCoreWebVitals, reactHooksRecommended, jsxA11yRecommended, importXRecommended, projectRules, commonJsFiles) so the final array reads as a list of layers. Use eslint-plugin-prettier/recommended shorthand. No behavior change beyond one extra warning surfaced by the recommended preset's default file scope.
mbarrenechea
approved these changes
May 12, 2026
# Conflicts: # client/pnpm-lock.yaml
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.
Summary
.eslintrc.jsonwith flateslint.config.mjs.eslint-config-next(pullseslint-plugin-react@7, no ESLint 10 support); wire@next/eslint-plugin-nextdirectly.@eslint-react/eslint-plugin+eslint-plugin-import-xas ESLint 10 native replacements.lintscript fromnext linttoeslint ..useMemo→useEffect(3 deck.gl components, real bugs), redundant!!foo, empty interface, dead expr, unsafe optional chain hoist.Test plan
pnpm check-types,pnpm lint,pnpm buildall passpnpm devstarts;/en,/es,/fr,/en/maprender