cloudfour / cloudfour/cloudfour.com-patterns

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

Đang mở
#2,465 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
SCSS
Star
26
Fork
3
Merge trung bình
19 giờ 32 phút
Pull request đã merge (30 ngày)
81

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
eslint, typescript
Lĩnh vực
build-system, tooling
Loại issue
Tái cấu trúc
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.