Skip to content

chore: migrate ESLint to flat config (v9 → v10) #36

Open

Description

@martyy-code

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.cjs will be silently ignored under v10.
  • parserOptions.project (current) is the old way; projectService: true reuses the TS Language Service, is faster, and avoids the documented OOM risk on larger monorepos.
  • The new helpers (defineConfig, globalIgnores, extends at block level) make a shared @repo/eslint-config package straightforward when we extract it later.

Acceptance criteria

  • Delete the root .eslintrc.cjs.
  • Create a root eslint.config.js (or .mjs) using defineConfig and globalIgnores from eslint/config.
  • Use tseslint.configs.recommendedTypeChecked (or strictTypeChecked) with parserOptions.projectService: true.
  • Preserve the existing jsonc-eslint-parser handling for *.json.
  • pnpm lint and pnpm lint:fix call eslint . directly (no next lint — Next 16 has removed it; the app already runs Next 16.1.6).
  • apps/web migrated to eslint-config-next/typescript + core-web-vitals in flat-config form if not already.
  • Upgrade ESLint to v10 and typescript-eslint to a compatible v8 patch before merging.
  • CI green on pnpm lint for the whole monorepo.

Risks

  • Type-checked rules are slower; keep the default disallowAutomaticSingleRunInference heuristic 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).

Activity

  1. added theissue type on Jul 13, 2026
  2. self-assigned this
    on Jul 13, 2026
  3. martyy-code commented on Jul 13, 2026

    @martyy-code
    ContributorAuthor

    Triage complete

    • Type: Task
    • Area: area:build
    • Status: ready
    • Priority: High
    • Effort: High

    Verification: CONFIRMED — .eslintrc.cjs exists at root and will be silently ignored under ESLint v10 (EOL Aug 2026). packages/type-testing/.eslintrc.json uses legacy eslintrc extends over a flat config. Root eslint.config.js uses parserOptions.project (not projectService: true) and lacks defineConfig/globalIgnores/jsonc-eslint-parser. ESLint is still v9. apps/web is already migrated to flat config with Next 16.1.6.

    Next steps: This issue is ready to be picked up. The migration requires:

    1. Delete root .eslintrc.cjs
    2. Migrate packages/type-testing/.eslintrc.json to flat config
    3. Update root eslint.config.js with defineConfig, globalIgnores, projectService: true, and jsonc-eslint-parser
    4. Upgrade ESLint → v10 and typescript-eslint to compatible v8

    Related: #42 (extract @repo/eslint-config) is blocked by this work.

    Triage by @martyy-code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:buildPackaging, exports map, tsconfigbreaking-changeChanges the public API surfaceenhancementNew feature or requeststatus:readyTriaged and accepted - ready to be picked up

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions