Upgrade @typescript-eslint to v8 (from v6)#1956
Conversation
*Why* Dependabot's #1955 bumped only @typescript-eslint/eslint-plugin to ^8.62.1 and failed: (a) it left parser/utils at ^6 (version-mismatch), and (b) 8.62.1 is an alpha — only 8.62.0 is a stable release. This does the upgrade properly. typescript-eslint v8 supports the repo's existing ESLint 8 / legacy .eslintrc setup (no flat-config migration required), so this is a self-contained bump. *What* - Bump @typescript-eslint/eslint-plugin, parser, and utils to ^8.62.0 (root + databricks-vscode package). Bump eslint ^8.55.0 -> ^8.57.0 (v8's minimum peer; stays on ESLint 8, resolves to 8.57.1) in all three package.json files. - Add @types/semver ^7.5.0 as an explicit devDependency: it was previously only present transitively via typescript-eslint v6; v8 no longer pulls it in, and whatsNewPopup.ts imports semver. - Fix the 50 lint errors surfaced by v8's stricter defaults: - no-unused-vars (25): drop unused `catch (e)` bindings -> bare `catch {}`. - no-require-imports (7): update stale `no-var-requires` disable directives to the renamed rule; convert `import path = require("path")` to `import * as`. - no-unused-expressions (16): rewrite 3 `x && x()` short-circuits in source as `if (x) { x(); }`; disable the rule for test/integ files (chai fluent + conditional assertions inherently trip it). - no-empty-object-type (2): replace empty `interface X extends TreeItem {}` with `type X = TreeItem`. *Verification* - `eslint src --ext ts` passes (0 errors); `yarn install --immutable` passes. - `yarn run build` passes; resolved versions: plugin/parser 8.62.0, eslint 8.57.1. Backward compatibility: dev/lint tooling + test-only assertions; no runtime, API, persisted-state, or config-format change to the shipped extension. Closes #1955. Co-authored-by: Isaac
|
🤖 Integration tests triggered automatically for Checks will be approved automatically on success. |
|
Integration tests: https://github.com/databricks-eng/eng-dev-ecosystem/actions/runs/28653140957 TLDR: no regressions — 26 passing / 6 failing, matching the current e2e baseline. Zero |
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Why
Replaces Dependabot's #1955, which bumped only
@typescript-eslint/eslint-pluginto^8.62.1and failed CI because (a) it leftparser/utilsat^6(version mismatch → "No candidates found"), and (b)8.62.1is an alpha — only8.62.0is a stable release.typescript-eslint v8 supports the repo's existing ESLint 8 / legacy
.eslintrcsetup (peereslint: ^8.57.0 || ^9 || ^10), so this is a self-contained upgrade — no flat-config migration required.What
@typescript-eslint/{eslint-plugin,parser,utils}→^8.62.0(root + databricks-vscode package).eslint^8.55.0→^8.57.0(v8's minimum peer; stays on ESLint 8, resolves to 8.57.1) across all three package.json files.@types/semver@^7.5.0as an explicit devDependency — it was previously present only transitively via typescript-eslint v6; v8 no longer pulls it in, andwhatsNewPopup.tsimportssemver.catch (e)bindings → barecatch {}.no-var-requiresdisable directives to the renamed rule; convertimport path = require("path")→import * as path.x && x()short-circuits in source asif (x) { x(); }; disable the rule for test/integ files (chai fluent + conditional assertions inherently trip it).interface X extends TreeItem {}→type X = TreeItem.Verification
eslint src --ext tspasses (0 errors);yarn install --immutablepasses;yarn run buildpasses.Backward compatibility: dev/lint tooling + test-only assertion changes; no runtime, API, persisted-state, or config-format change to the shipped extension.
Closes #1955.
This pull request and its description were written by Isaac.