refactor(linter/plugins): bump @typescript-eslint/scope-manager dependency#18632
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merge activity
|
…endency (#18632) Closes #18398. Bump `@typescript-eslint/scope-manager` to latest. That release contains 2 bug fixes: * typescript-eslint/typescript-eslint#11982 * typescript-eslint/typescript-eslint#11995 We had workarounds for both bugs, added in: * #18312 * #18402 This PR bumps dependency to the new version which included the big fixes, and removes both workarounds, as they're no longer required. Also bumped all other usages of `@typescript-eslint/*` packages, so we use the same versions for everything.
4a44131 to
3d349ca
Compare
There was a problem hiding this comment.
Pull request overview
This PR upgrades the TS-ESLint-related dependencies to a version that includes upstream fixes for scope and "use strict" handling, and removes now-unnecessary local workarounds/patches.
Changes:
- Remove the custom pnpm patch for
@typescript-eslint/scope-managerand rely on the upstream fix. - Bump all
@typescript-eslint/*package usages (parser, scope-manager, visitor-keys, utils, etc.) to8.54.0. - Drop the local
fixCatchClauseDefinitionsworkaround in the oxlint scope plugin now that the upstream scope manager is fixed.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
pnpm-workspace.yaml |
Removes the @typescript-eslint/scope-manager patched dependency entry now that the upstream version includes the fix. |
pnpm-lock.yaml |
Updates lockfile entries to @typescript-eslint/*@8.54.0 and removes references to the local scope-manager patch. |
patches/@typescript-eslint__scope-manager.patch |
Deletes the custom "use strict" handling patch that is now covered by upstream. |
napi/parser/package.json |
Bumps @typescript-eslint/visitor-keys dev dependency to ^8.54.0 for consistency. |
apps/oxlint/package.json |
Bumps @typescript-eslint/parser and @typescript-eslint/scope-manager dev dependencies to ^8.54.0. |
apps/oxlint/src-js/plugins/scope.ts |
Removes the fixCatchClauseDefinitions workaround and its invocation, trusting the updated TS-ESLint scope manager behavior. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
In ES3, directives didn't exist yet, and therefore `"use strict"` is treated as a standard string literal, rather than a directive. In conformance tests, when test case specifies ES3, walk the AST and set `directive` property of all `ExpressionStatement`s to `null`. This transforms any directives in AST into plain string literals. Combined with #18632 which fixed `"use strict"` processing in TS-ESLint, this means there are 8 ESLint test cases we no longer have to skip. More importantly, we're less likely to run into erroneous test failures when testing other plugins, which are laborious to diagnose.

Closes #18398.
Bump
@typescript-eslint/scope-managerto latest. That release contains 2 bug fixes:def.nametypescript-eslint/typescript-eslint#11982"use strict"directives typescript-eslint/typescript-eslint#11995We had workarounds for both bugs, added in:
CatchClausescopes #18312This PR bumps dependency to the new version which included the big fixes, and removes both workarounds, as they're no longer required.
Also bumped all other usages of
@typescript-eslint/*packages, so we use the same versions for everything.