Skip to content

Upgrade to ESLint 10 (blocked on eslint-config) #1627

Open

Description

@joshunrau

eslint is held at 9.39.x (9.39.5, the last 9.x release, which npm now marks as unsupported) by the dependency update on the deps branch. The newest release eligible under the repo's 7-day minimumReleaseAge on 2026-10-04 was 10.11.0.

Why it was not upgraded

@douglasneuroinformatics/eslint-config@6.0.0 peers eslint 9.x. Its plugins are on their ESLint 9 lines: @eslint/js ^9, typescript-eslint, eslint-plugin-react, eslint-plugin-import, eslint-plugin-jsdoc, eslint-plugin-astro and the rest.

What is required

  1. An eslint-config release that peers ESLint 10, with plugin versions that support it.
  2. Bump eslint, run pnpm lint, and read every file eslint --fix rewrites. Moving from 9.23 to 9.39 already removed now-unused no-var disable directives in react-core.

Activity

  1. added
    Priority: Low
    Difficulty: Low
    Chore
    Area: Infrastructure
    Upstream
    on Oct 5, 2026
  2. joshunrau commented on Oct 26, 2026

    @joshunrau
    CollaboratorAuthor

    Still blocked on main (d86740e). @douglasneuroinformatics/eslint-config 6.0.0 is still the latest release. Its own peer range is the easy part. The real blockers are three third-party plugins it bundles.

    What actually blocks it

    Most of the plugins the issue lists already accept ESLint 10. Even the floors of eslint-config's current ranges for typescript-eslint (8.58.2) and eslint-plugin-perfectionist (5.8.0) peer ^10. eslint-plugin-astro 1.7 (>=8.57.0) and eslint-plugin-jsonc 2.x (>=6.0.0) allow it too. @eslint/js, eslint-plugin-jsdoc and eslint-plugin-svelte need a major bump (10.0.1, 65.x, 3.x). eslint-plugin-astro 2.0 and later require ESLint 10. Only three plugins have no release that peers ESLint 10:

    I ran ESLint 10.13.0 on scratch files with these three force-installed, using every rule this repo takes from them. import/no-default-export crashes:

    TypeError: Error while loading rule 'import/no-default-export': Cannot use 'in' operator to search for 'sourceType' in undefined
    

    The plugin's lib/core/sourceType.js reads context.parserOptions, which ESLint 10 removed. #3230 changes that file. eslint.config.js:205 turns the rule on for the web and react-core components, so overriding the peer range alone would make pnpm lint crash. The rest ran without errors:

    • import/no-duplicates (including --fix), import/extensions, import/exports-last and import/consistent-type-specifier-style
    • react's recommended set, plus function-component-definition and jsx-no-literals
    • jsx-a11y's recommended set

    react only calls the removed context.getFilename() when version is 'detect', and eslint.config.js:121 pins it to '18'.

    Options for the next eslint-config major

    1. Wait for the import release. It fixes the only crash. eslint-config can then peer eslint ^10 and keep react and jsx-a11y at their current versions, with a peer warning. The catch: react's maintainer says "until the peer dep range is updated, one should not attempt to use eslint 10 with this plugin" (ESLint v10 compatibility jsx-eslint/eslint-plugin-react#3977).
    2. Switch import and jsx-a11y to forks. eslint-plugin-import-x 4.17.1 peers ^10 and has all five import rules used here. eslint-plugin-jsx-a11y-x 0.2.0 peers ^9 || ^10, and eslint-plugin-astro 3.2.1 already lists it as an optional peer. Register both under the existing import and jsx-a11y keys. Under new keys, every rule name in the repo has to be renamed:
      • eslint.config.js:137,154,205
      • the seven disable directives
      • two comments in packages/schemas/src
      • eight doc lines: AGENTS.md:202, apps/web/AGENTS.md:167, packages/react-core/AGENTS.md:9, packages/schemas/AGENTS.md:25,28, storybook/AGENTS.md:48, .agents/skills/odc-done/SKILL.md:25 and .agents/skills/odc-frontend/SKILL.md:31
    3. Replacing react is not an option. @eslint-react/eslint-plugin has no jsx-no-literals and no function-component-definition, and react/jsx-no-literals enforces the translation rule (apps/web/AGENTS.md:150).

    I recommend option 1, falling back to import-x if the import release keeps slipping. ESLint 9 has been EOL since 2026-08-06, but it only runs in dev and CI, so Low priority still fits. Keep typescript 6.0.x in the new major's peers. typescript-eslint 8.72.0 still caps TypeScript at <6.1.0, so tying this to #1628 would hold ESLint 10 behind TypeScript 7.

    Repo side, once that release exists

    • Bump package.json:38 and :46. Both are literal versions, but the root rule wants catalog: entries. Land this after build: upgrade dependencies held back by breaking changes #1660, which rewrites the same devDependency block.
    • @eslint/js 10 adds no-unassigned-vars, no-useless-assignment and preserve-caught-error to recommended, and eslint-config spreads that set into every JS and TS file. I ran ESLint 10.13.0 with those three rules over every JS and TS file on main. It reports one error: in the ZodError branch, packages/release-info/src/index.ts:56 throws a new Error without { cause: err }. preserve-caught-error only offers suggestions, so --fix will not change this line.
    • Nothing else in the migration guide applies. main has no eslint-env comments, and no-shadow-restricted-names reports nothing. The only config is the root eslint.config.js, which the new per-file lookup still finds. The local odc rules already use context.filename.
    • Tests: in packages/release-info/src/__tests__/index.test.ts, assert that the parse error's cause is the ZodError. Nothing else changes runtime behaviour, so no new e2e test is needed. Run pnpm lint, pnpm test:coverage and pnpm test:e2e. Also check by hand that react/jsx-no-literals and import/no-default-export still report errors in apps/web/src/components, because those two rules enforce repo rules.

    Triage note written with Claude Code. Code references point at main @ d86740e.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: InfrastructureChoreDifficulty: LowPriority: LowUpstream

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions