Conversation
`npx eslint . --ext .js,.jsx,.ts,.tsx` currently crashes on `main`:
Error: typescript-eslint does not support TS 7.0.
at Object.<anonymous> (node_modules/typescript-eslint/dist/index.js:52:11)
That's a hard runtime guard inside typescript-eslint@8.70.0 itself, thrown
when it loads and inspects the installed typescript version - it's a
separate check from npm's peer-dependency resolution.
Root cause: commit c62fb6c bumped both `typescript` (6.0.3 -> 7.0.2) and
`typescript-eslint` (8.68.0 -> 8.70.0) together. `typescript-eslint@8.70.0`
does not yet support TS 7.0 (its own error message points to running against
TS 6, and to the upstream issue tracking TS >=7.1 support). A same-day
follow-up (9d5dd52, "Pin typescript") reverted `typescript` back to 6.0.3
and fixed it, but a later commit (7ed646c, "Resolve eslint old ts issues")
re-bumped it back to 7.0.2 alongside an unrelated `.npmrc` change
(`legacy-peer-deps=true`), reintroducing the crash. That `.npmrc` addition
only silences `npm install`'s peer-dependency ERESOLVE warning; it cannot
suppress typescript-eslint's own internal version check, so it didn't (and
can't) fix this.
This reverts the `typescript` pin to 6.0.3, the last version confirmed
compatible with `typescript-eslint@8.70.0`, matching what 9d5dd52 already
established. `package-lock.json` is regenerated for just this one package via
`npm install typescript@6.0.3 --package-lock-only`; the diff is exactly the
removal of TS7's native per-platform compiler packages
(`@typescript/typescript-<platform>`, new in TS7, absent from 6.x), nothing
else changes.
Verified: `npx eslint . --ext .js,.jsx,.ts,.tsx` now runs clean (0 errors, 4
pre-existing unrelated warnings). `npx tsc --noEmit` also passes with no
errors, confirming nothing in this codebase relies on TS 7-only syntax. Ran
the full OSS `.test.ts` suite; all pass except one
(`server/lib/traefik/traefikConfig.test.ts`) that fails identically on
unmodified `main` - confirmed unrelated (a pre-existing config-initialization
issue when that file is run standalone, unrelated to TypeScript's version).
`.npmrc`'s `legacy-peer-deps=true` is left in place; it's not incorrect on
its own; and removing it is out of scope for this fix.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The lockfile has a critical native-package selection regression, and TypeScript remains unbounded in both manifests.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Reverts TypeScript to 6.0.3 to restore compatibility with typescript-eslint@8.70.0 and fix ESLint crashes.
Changes:
- Updates the TypeScript dependency declaration.
- Regenerates the lockfile and removes TypeScript 7 platform packages.
File summaries
| File | Summary | Findings |
|---|---|---|
package.json |
Changes TypeScript to the 6.0.3 line. | Moderate: use exact 6.0.3 instead of ^6.0.3 (3 votes). |
package-lock.json |
Resolves TypeScript 6.0.3 and updates dependency metadata. | Critical: preserve sharp’s libc selectors (2 votes). Moderate: pin the root TypeScript specifier to 6.0.3 (1 vote). |
Review details
- Files reviewed: 1/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "tsc-alias": "1.9.5", | ||
| "tsx": "4.23.13", | ||
| "typescript": "7.0.2", | ||
| "typescript": "^6.0.3", |
There was a problem hiding this comment.
Good catch, thanks — you're right, and this wasn't intentional. npm install typescript@6.0.3 --package-lock-only applied npm's default save-prefix behind the scenes, so both package.json and the lockfile's root spec ended up as ^6.0.3 instead of the exact 6.0.3 I meant to pin. Since typescript-eslint@8.70.0's own peer range is <6.1.0, that range would have let a future install silently drift to an incompatible 6.1.x+ and reintroduce this exact crash.
Fixed in d0dbe8c — re-ran with --save-exact, so both package.json and the lockfile's root spec now pin exactly 6.0.3. Re-verified npx eslint . --ext .js,.jsx,.ts,.tsx still runs with 0 errors.
`npm install typescript@6.0.3 --package-lock-only` (used in the previous commit) applies npm's default save-prefix, which wrote `^6.0.3` to both package.json and the lockfile's root spec instead of an exact `6.0.3`. That range permits any future 6.x (including 6.1.0+), but typescript-eslint@8.70.0's own declared peer range is `<6.1.0` (package-lock.json's typescript-eslint entry) - so a future fresh install or lockfile refresh could silently resolve a 6.1.0+ typescript and reintroduce the exact crash this fix addresses. Re-ran with --save-exact to pin exactly 6.0.3 in both manifests, matching what's actually resolved and tested. Re-verified: `npx eslint . --ext .js,.jsx,.ts,.tsx` still 0 errors. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
AI Disclosure
Claude Code (Anthropic) was used to trace the failure through the CI logs, git history, and
typescript-eslint's own source to find the exact root cause, and to build and verify this fix. I directed the investigation and verified every claim myself, including bisecting the commit history, reproducing the crash locally, and confirming the fix with a clean ESLint/tsc run against the actual codebase.Description
Summary
ESLintcurrently fails on every PR againstmain(and onmainitself). The failure isn't a lint violation — it's a hard crash before any file is linted:This is a runtime version guard inside
typescript-eslintitself, distinct from npm's peer-dependency resolution, and it fires on everynpx eslintinvocation given the currently pinned versions.Root cause (bisected via git history)
c62fb6cbe("Bump the npm-dependencies group... with 29 updates") bumpedtypescript6.0.3 → 7.0.2 andtypescript-eslint8.68.0 → 8.70.0 in the same dependency-group update.typescript-eslint@8.70.0doesn't support TS 7.0 yet — its own error message says to run it against the TS 6 API, and links the upstream issue tracking TS ≥7.1 support.9d5dd526b("Pin typescript"), 17 minutes later, revertedtypescriptback to6.0.3— this fixed it.7ed646c02("Resolve eslint old ts issues and revert tanstack table") re-bumpedtypescriptback to7.0.2, alongside adding.npmrc'slegacy-peer-deps=truewith the comment "it works fine against it in practice." That re-introduced the crash.The
.npmrcaddition doesn't (and can't) fix this:legacy-peer-depsonly tellsnpm installto skip enforcing declared peer-dependency ranges (silencing anERESOLVEwarning at install time). It has no effect ontypescript-eslint's own internal check, which runs later, at lint time, when the package loads and inspects the installedtypescriptversion directly.What changed
package.json:typescript7.0.2→6.0.3(the version already proven compatible by9d5dd526b).package-lock.json: regenerated for just this one package vianpm install typescript@6.0.3 --package-lock-only. The entire diff is the removal of TypeScript 7's native per-platform compiler packages (@typescript/typescript-<platform>, new in TS 7, not present in 6.x) and their transitive deps — nothing else in the dependency tree changes..npmrc'slegacy-peer-deps=trueis left as-is; it isn't wrong on its own and removing it is out of scope for this fix.Verification
npx eslint . --ext .js,.jsx,.ts,.tsx— was crashing before this change; now runs clean: 0 errors (4 pre-existingprefer-constwarnings in unrelated files, untouched by this PR).npx tsc --noEmit— passes with 0 errors ontypescript@6.0.3, confirming nothing in the codebase relies on TS 7-only syntax or type-checker behavior..test.tssuite — all pass exceptserver/lib/traefik/traefikConfig.test.ts, which I confirmed fails identically on unmodifiedmain(a pre-existing config-singleton initialization issue when that file is run standalone viatsx, unrelated to the TypeScript version — reproduced with this change stashed out).How to test?
npm install(picks uptypescript@6.0.3from the updated lockfile)npx eslint . --ext .js,.jsx,.ts,.tsx— should complete with 0 errorsnpx tsc --noEmit— should complete with 0 errors🤖 Generated with Claude Code