chore(eslint): upgrade ESLint 8 → 9 with flat config migration#497
Merged
Conversation
Upgrades ESLint from 8.57.1 to 9.x and migrates from the legacy
.eslintrc.js format to ESLint 9's flat config (eslint.config.mjs).
## Package changes
- eslint: ^8.57.1 → ^9.0.0
- Removed @typescript-eslint/eslint-plugin and @typescript-eslint/parser
(replaced by the typescript-eslint meta-package which bundles both)
- Removed eslint-plugin-import (replaced by eslint-plugin-import-x, a
maintained ESLint 9 / flat-config-first fork)
- Added @eslint/js ^9.0.0 (provides js.configs.recommended for flat config)
- Added typescript-eslint ^8.0.0 (meta-package with tseslint.config() helper)
- Added eslint-plugin-import-x ^4.0.0
- Added globals ^15.0.0 (replaces the env: block removed in ESLint 9)
## Config migration
Deleted .eslintrc.js and .eslintignore. All config is now in
eslint.config.mjs using ESLint 9 flat config format:
- ignores: replaces .eslintignore and ignorePatterns
- languageOptions.globals: replaces env: { browser, es2021, node }
- languageOptions.parserOptions: replaces top-level parserOptions
- extends via tseslint.config(): replaces the extends array
- All existing rules are preserved with identical severity levels
Resolution-dependent import-x rules (no-unresolved, namespace, named)
are disabled — the TypeScript compiler already validates module
resolution for this extension, making those checks redundant. The same
approach was used with the old eslint-plugin-import/typescript config.
## CI fixes
- Removed --ignore-path .galintignore from the lint step in
main.yaml (flag removed in ESLint 9; the file never existed anyway)
- Removed --ext .ts,.tsx from the lint script in package.json
(file extensions are now controlled by the files glob in the config)
## Dependabot
Removed eslint from exclude-patterns in all three npm package
ecosystems so Dependabot will track the new ESLint 9 packages going
forward.
## Source files
Removed 7 stale `// eslint-disable-next-line import/no-unresolved`
inline comments from client/src. These referenced the old plugin prefix
(import/ not import-x/) and caused ESLint 9 to error with "Definition
for rule not found". The rule is disabled globally in the new config so
the inline directives were no longer needed regardless.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades the repo’s linting toolchain to ESLint 9 and migrates from legacy .eslintrc.js / .eslintignore to ESLint’s flat config (eslint.config.mjs), along with related CI and Dependabot adjustments.
Changes:
- Bump ESLint to
^9.0.0, switch totypescript-eslintmeta-package, and replaceeslint-plugin-importwitheslint-plugin-import-x. - Add
eslint.config.mjsflat config (including ignores, globals, and preserved rules) and remove legacy config/ignore files. - Update CI lint invocation and Dependabot grouping rules; remove now-stale inline
eslint-disabledirectives in client sources.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updates lint script and devDependencies for ESLint 9 + flat config tooling. |
| package-lock.json | Lockfile refresh for updated ESLint ecosystem packages. |
| eslint.config.mjs | Introduces ESLint 9 flat config with TS + import-x + prettier integration. |
| client/src/test/hover.test.ts | Removes stale inline eslint-disable-next-line import/no-unresolved. |
| client/src/test/helper.ts | Removes stale inline eslint-disable-next-line import/no-unresolved. |
| client/src/test/extension.test.ts | Removes stale inline eslint-disable-next-line import/no-unresolved. |
| client/src/test/diagnostics.test.ts | Removes stale inline eslint-disable-next-line import/no-unresolved. |
| client/src/extension.node.ts | Removes stale inline eslint-disable-next-line import/no-unresolved. |
| client/src/extension.common.ts | Removes stale inline eslint-disable-next-line import/no-unresolved. |
| client/src/extension.browser.ts | Removes stale inline eslint-disable-next-line import/no-unresolved. |
| .github/workflows/main.yaml | Simplifies lint step to npm run lint (drops ignore-path flag). |
| .github/dependabot.yaml | Removes eslint exclusion so Dependabot can track ESLint-related packages. |
| .eslintrc.js | Deletes legacy ESLint config in favor of flat config. |
| .eslintignore | Deletes legacy ESLint ignore file in favor of flat config ignores. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The file was only consumed by --ignore-path .galintignore in the CI lint step, which was removed as part of the ESLint 9 migration. client/src/test/diagnostics.test.ts now passes lint cleanly so the exclusion is no longer needed.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rhamzeh
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades ESLint from 8.57.1 to 9.x and migrates from the legacy .eslintrc.js format to ESLint 9's flat config (eslint.config.mjs).
Package changes
Config migration
Deleted .eslintrc.js and .eslintignore. All config is now in eslint.config.mjs using ESLint 9 flat config format:
Resolution-dependent import-x rules (no-unresolved, namespace, named) are disabled — the TypeScript compiler already validates module resolution for this extension, making those checks redundant. The same approach was used with the old eslint-plugin-import/typescript config.
CI fixes
Dependabot
Removed eslint from exclude-patterns in all three npm package ecosystems so Dependabot will track the new ESLint 9 packages going forward.
Source files
Removed 7 stale
// eslint-disable-next-line import/no-unresolvedinline comments from client/src. These referenced the old plugin prefix (import/ not import-x/) and caused ESLint 9 to error with "Definition for rule not found". The rule is disabled globally in the new config so the inline directives were no longer needed regardless.Description
What problem is being solved?
How is it being solved?
What changes are made to solve it?
References
Review Checklist
main