chore: @typescript-eslint plugin and parser are four majors apart, breaking lint on a fresh install
Summary
The root package.json declares two incompatible major versions:
"@typescript-eslint/eslint-plugin": "^8.68.0",
"@typescript-eslint/parser": "^5.54.1",bun.lock resolves the plugin to 8.68.0, which declares "peerDependencies": { "@typescript-eslint/parser": "^8.68.0" }. The parser resolves to 5.62.0.
On a fresh install, type-aware rules then crash:
services.getTypeAtLocation is not a functionIt crashes on files the change under test never touched, so bun run lint is unusable rather than merely noisy.
Why it is not visible in every checkout
An existing node_modules can still hold the older plugin. In one checkout here, node_modules/@typescript-eslint/eslint-plugin is 5.62.0 and matches the parser, so linting works normally:
$ npx eslint packages/core/src/service/services/order.service.ts
✖ 5 problems (0 errors, 5 warnings)The same repository, freshly installed per the lockfile, gets plugin 8.68.0 against parser 5.62.0 and crashes. So this reproduces for a new contributor and in CI, and does not reproduce for anyone whose node_modules predates the plugin bump.
Suggested fix
Move the parser to ^8.68.0 to match the plugin. The two packages are released in lockstep and are not supported across majors.
Worth checking at the same time whether the eslint config still uses the flat-config or legacy shape the v8 plugin expects, since the parser has been four majors behind and the config may have been written against v5.
Found via
A merge-lane session on #5338, where a worktree with a fresh bun install could not lint its own changes.
Source: vendurehq/vendure