Repository navigation
chore: migrate ESLint to flat config (v9 → v10) #36
Copy link
Copy link
Open
Labels
area:buildPackaging, exports map, tsconfigPackaging, exports map, tsconfigbreaking-changeChanges the public API surfaceChanges the public API surfaceenhancementNew feature or requestNew feature or requeststatus:readyTriaged and accepted - ready to be picked upTriaged and accepted - ready to be picked up
Description
Description
The repo still uses a legacy .eslintrc.cjs at the root. We need to migrate to ESLint flat config (eslint.config.js / .mjs), adopt the official defineConfig / globalIgnores helpers, switch to typescript-eslint v8 with parserOptions.projectService: true, and align with the requirements of ESLint v10 (which has fully removed eslintrc support).
Why
- ESLint v9 reaches EOL on 2026-08-06, so we cannot stay on the legacy config long-term.
- ESLint v10 (released Feb 2026) has removed eslintrc entirely. The current
.eslintrc.cjswill be silently ignored under v10. parserOptions.project(current) is the old way;projectService: truereuses the TS Language Service, is faster, and avoids the documented OOM risk on larger monorepos.- The new helpers (
defineConfig,globalIgnores,extendsat block level) make a shared@repo/eslint-configpackage straightforward when we extract it later.
Acceptance criteria
- Delete the root
.eslintrc.cjs. - Create a root
eslint.config.js(or.mjs) usingdefineConfigandglobalIgnoresfromeslint/config. - Use
tseslint.configs.recommendedTypeChecked(orstrictTypeChecked) withparserOptions.projectService: true. - Preserve the existing
jsonc-eslint-parserhandling for*.json. -
pnpm lintandpnpm lint:fixcalleslint .directly (nonext lint— Next 16 has removed it; the app already runs Next 16.1.6). -
apps/webmigrated toeslint-config-next/typescript+core-web-vitalsin flat-config form if not already. - Upgrade ESLint to v10 and typescript-eslint to a compatible v8 patch before merging.
- CI green on
pnpm lintfor the whole monorepo.
Risks
- Type-checked rules are slower; keep the default
disallowAutomaticSingleRunInferenceheuristic and add a CI-only job split if needed. - Plugin compatibility: any plugin not yet flat-config-ready must be replaced or removed.
Related
- Documented in
docs/internal/learnings/eslint/eslint-monorepo-2026.md. - Blocks extracting
packages/eslint-config(separate issue).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:buildPackaging, exports map, tsconfigPackaging, exports map, tsconfigbreaking-changeChanges the public API surfaceChanges the public API surfaceenhancementNew feature or requestNew feature or requeststatus:readyTriaged and accepted - ready to be picked upTriaged and accepted - ready to be picked up
Activity
martyy-code commentedon Jul 13, 2026
Triage complete
Verification: CONFIRMED —
.eslintrc.cjsexists at root and will be silently ignored under ESLint v10 (EOL Aug 2026).packages/type-testing/.eslintrc.jsonuses legacy eslintrcextendsover a flat config. Rooteslint.config.jsusesparserOptions.project(notprojectService: true) and lacksdefineConfig/globalIgnores/jsonc-eslint-parser. ESLint is still v9.apps/webis already migrated to flat config with Next 16.1.6.Next steps: This issue is ready to be picked up. The migration requires:
.eslintrc.cjspackages/type-testing/.eslintrc.jsonto flat configeslint.config.jswithdefineConfig,globalIgnores,projectService: true, andjsonc-eslint-parserRelated: #42 (extract @repo/eslint-config) is blocked by this work.
Triage by @martyy-code.