ESLint is completely broken: TypeScript 7 removed the programmatic Compiler API
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 62/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Start by checking the TypeScript and typescript-eslint dependency declarations, then inspect the yarn lint, lint:fix, lint:warn, and dev:lint entry points. Verify the chosen compatibility approach by running those lint commands and confirm that the TypeScript 7 and Node version notes in CLAUDE.md are no longer misleading.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Symptom
Every ESLint invocation crashes on load, before linting a single file:
$ npx eslint src/bus/ingest.ts
Oops! Something went wrong! :(
ESLint: 10.1.0
TypeError: Cannot read properties of undefined (reading 'Cjs')
at Object.<anonymous> (node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js:59:18)
It fails identically on untouched files, so it is not caused by any particular source file. yarn lint, yarn lint:fix, yarn lint:warn and yarn dev:lint are all dead.
Root cause
TypeScript 7.0 removed the public programmatic Compiler API, and typescript-eslint is built on it.
The root export of the typescript package is now just a version stub:
> const ts = require("typescript");
> Object.keys(ts)
[ 'version', 'versionMajorMinor' ] // two exports, that's all
> typeof ts.Extension, typeof ts.ScriptKind, typeof ts.createProgram
'undefined' 'undefined' 'undefined'
// node_modules/typescript/package.json
"exports": {
".": "./lib/version.cjs",
"./unstable/sync": "./dist/api/sync/api.js",
"./unstable/ast": "./dist/ast/index.js",
...
}
The compiler API moved behind typescript/unstable/* subpaths as part of the Go port. So this line, evaluated at module load, throws:
// @typescript-eslint/typescript-estree/dist/create-program/shared.js:59
exports.DEFAULT_EXTRA_FILE_EXTENSIONS = new Set([
ts.Extension.Cjs, // <- ts.Extension is undefined
...
]);
Anything doing a bare require("typescript") and expecting the classic API breaks the same way — ts-jest and ts-morph are commonly reported alongside ESLint.
Version state
| Installed | Note | |
|---|---|---|
typescript |
7.0.2 |
bumped from ^5.7.2 in 1c51aa8 ("Upgrade frontend to TypeScript 7 with Jest compatibility") |
eslint |
10.1.0 |
|
typescript-eslint |
8.57.2 |
latest is 8.70.0 |
[email protected] (latest) declares "typescript": ">=4.8.4 <6.1.0". No published version supports TypeScript 7 — upgrading typescript-eslint does not fix this.
Upstream typescript-eslint#12518 ("TypeScript 7.0.2 Support") is closed as not planned. The stable programmatic API is expected in TypeScript 7.1 (npm dist-tag currently shows next: 7.1.0-dev.*); see also #10940 for the tsgo type-information work.
Blast radius
Broken:
yarn lint,yarn lint:fix,yarn lint:warn,yarn dev:lint
Not affected — worth stating so nobody chases the wrong thing:
- CI — the workflow has three jobs (Build, Test, E2E) and no lint job, so this is not currently red in CI.
- Tests — jest transforms via
babel-jest+@babel/preset-typescript, which never touches the TS compiler API. - Build —
tsc -b && vite build; thetscCLI is the native binary and works fine. yarn dev— plainvite, no lint step.
So the practical cost is that nothing has been lint-verified since the TS 7 bump, and contributors get a crash instead of a lint result.
Options
A. Pin typescript to ^6.0.3 (latest stable 6.x, inside typescript-eslint's supported range). Restores linting immediately. Costs the TS 7 compile speed, though @typescript/native-preview can be added alongside to keep a fast tsgo --noEmit for CI. This is the workaround the ecosystem is currently recommending.
B. Stay on TS 7 and accept lint is unavailable until TS 7.1 ships the stable API and typescript-eslint adopts it. Given #12518 is closed as not planned, that is an open-ended wait. If we take this, we should delete or clearly mark the four lint scripts so they stop looking like they work.
C. Replace ESLint with oxlint or Biome, both of which have their own TypeScript parsers and no dependency on the TS compiler API. Largest change; would need a rule-parity pass against the existing config, and neither does type-aware linting.
Recommendation: A, unless TS 7 was adopted specifically for build speed — in which case A plus @typescript/native-preview keeps both. Worth deciding deliberately since the TS 7 bump was intentional.
Also worth fixing while we're here
CLAUDE.md still lists "TypeScript 5 - Type safety" in the tech stack, and the Node pin section says 22.13.0 while the local toolchain is on 22.22.1. Both are drift from the TS 7 bump.
- Ngôn ngữ chính
- TypeScript
- Star
- 2
- Fork
- 5
- Merge trung bình
- 21 giờ 38 phút
- Pull request đã merge (30 ngày)
- 105
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của block52/ui
-
guards: accept readonly arrays (and other array-likes) in isEmpty / hasElements / safeLengthĐang mởenhancement tech debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: next-to-act flash stuck on the last folder when their fold closes a called all-in (fold + runout + hand_ended in one snapshot)Có thể đã có người làm @bitcoinbrisbane đã nhận hôm nay. Đang mởanimation bug game-flow sit-and-go UI Week 2
block52/ui#968 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feat(ui): player language setting and translated player screensCó thể đã có người làm @Dzeezbtc đã nhận 2 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feat(ui): player notes and tags — click a seat to note a player; tag icons (fish, shark, tight, loose…) show by their pillCó thể đã có người làm @Dzeezbtc đã nhận 4 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
architecture refactor tech debt
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Chip source filter and denial markers miss Storage rows when a Storage activity source is pickedĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
omdsh-dev/DSH-better-sidebar#1141 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
desktop linux photos
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Cleanup SetupCó thể đã có người làm @AlexanderKaran đã nhận hôm nay. Đang mởdocumentation enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
e18e/framework-tracker#769 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(docker): correct stale --db-path comments in fetch/git Dockerfiles and clarify git READMEĐang mởbug v2
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
modelcontextprotocol/servers#5483 ·
Maintainer thường phản hồi trong vòng 1 ngày