cloudfour / cloudfour/cloudfour.com-patterns
TypeScript 6 is blocked: typescript-eslint misreads types under it
- Dominant language
- SCSS
- Stars
- 26
- Forks
- 3
- Avg merge
- 19h 32m
- Merged PRs (30d)
- 81
Description
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. **#2464** — `eslint-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.
Contributor guide
Research direction
Start with the dependency setup, tsconfig.json, and the ts-dist build output, then run npm ci to verify the lockfile resolves TypeScript 6.0.3 with the stated peer ranges. Run the full type-check and build, and review anything TypeScript 6 newly rejects; done means those checks pass without the TypeScript 7 lockfile failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, typescript
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100