Skip to content

TypeScript 6 is blocked: typescript-eslint misreads types under it #2465

Description

@spaceninja

This repo is on TypeScript 5.9.3 and never got the v6 upgrade. It will need it before the ESLint 10 / @cloudfour/eslint-config v26 work in #2458 can land.

Why we're stuck on 5.x

Renovate opened #2437 (TypeScript v7), which was closed because TypeScript 7 is incompatible with typescript-eslint — it peers typescript: ">=4.8.4 <6.1.0". Unlike our sibling repos there was never a v6 PR here at all, so nothing replaced it.

@cloudfour/eslint-config did make the jump — cloudfour/eslint-config#704 merged TypeScript v6 there.

Why it matters

@cloudfour/eslint-config v26 is built on eslint-config-xo@1.0.0, which declares:

peerDependencies: { typescript: ">=6" }

On TypeScript 5.9.3 that peer is unsatisfied, so npm installs typescript@7.0.2 alongside our pinned copy to satisfy it, dragging in TypeScript 7's @typescript/typescript-* platform binaries. Those aren't in package-lock.json, so npm ci fails with Missing: typescript@7.0.2 from lock file. That is exactly what's breaking cloudfour/simple-svg-placeholder#302 right now.

Why 6.0.3 specifically

The two peer ranges in play only overlap on the 6.0.x line:

Package Peer range
eslint-config-xo@1.0.0 typescript: ">=6"
typescript-eslint@8.66.0 (a dependency of xo) typescript: ">=4.8.4 <6.1.0"

TypeScript 7.0.2 is currently latest on npm but fails the second range — which is why #2437 was closed. 5.9.3 fails the first. 6.0.3 is the only line satisfying both.

Two separate blockers here

Worth being explicit that this repo has two independent things standing between it and v26, and fixing one won't unblock #2458 on its own:

  1. This issue — TypeScript 5.9.3 vs xo's >=6 peer.
  2. Drop eslint-plugin-react so we can upgrade to ESLint 10 #2464eslint-plugin-react@7.37.5 supports ESLint ^9.7 at most, so it can't coexist with v26's eslint ^10.6.0 requirement.

#2458 currently fails at npm ci on the second of those, so the TypeScript problem hasn't even surfaced there yet. It will once #2464 is resolved.

This one needs a real check

This repo uses TypeScript properly — there's a tsconfig.json and a ts-dist build output — so 5.9.3 → 6.0.3 is a genuine major upgrade, not the peer-satisfying formality it is in simple-svg-placeholder. It should get a full type-check and build, with a review of anything TypeScript 6 newly rejects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions