Skip to content

chore(eslint): migrate to ESLint 10 flat config#148

Merged
mitoperni merged 5 commits into
developfrom
chore/eslint-v10
May 12, 2026
Merged

chore(eslint): migrate to ESLint 10 flat config#148
mitoperni merged 5 commits into
developfrom
chore/eslint-v10

Conversation

@mitoperni

@mitoperni mitoperni commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Bump ESLint 8 → 10.3.0, typescript-eslint 7 → 8.59.2.
  • Replace .eslintrc.json with flat eslint.config.mjs.
  • Drop eslint-config-next (pulls eslint-plugin-react@7, no ESLint 10 support); wire @next/eslint-plugin-next directly.
  • Add @eslint-react/eslint-plugin + eslint-plugin-import-x as ESLint 10 native replacements.
  • Switch lint script from next lint to eslint ..
  • Fix lint surfaced by the new stack: useMemouseEffect (3 deck.gl components, real bugs), redundant !!foo, empty interface, dead expr, unsafe optional chain hoist.

Test plan

  • pnpm check-types, pnpm lint, pnpm build all pass
  • pnpm dev starts; /en, /es, /fr, /en/map render
  • Husky pre-commit hook runs ESLint successfully

mitoperni added 2 commits May 11, 2026 18:26
- 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)
@mitoperni mitoperni self-assigned this May 11, 2026
@vercel

vercel Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rangelands-data-platform Ready Ready Preview, Comment May 12, 2026 8:00am

Request Review

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.
@mitoperni mitoperni marked this pull request as ready for review May 11, 2026 18:57
@mitoperni mitoperni merged commit 1616001 into develop May 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants