Migrate to eslint-plugin-import-x and update ESLint#7
Conversation
- Bump eslint from 9.39.3 to 10.0.3 and @eslint/js from 9.39.3 to 10.0.1 - Replace eslint-plugin-import (incompatible with ESLint 10) with eslint-plugin-import-x - Update all import/ rule prefixes and settings to import-x/ - Disable no-useless-assignment in compile-test files (new ESLint 10 rule) - Bump Node.js engine requirement from >=20.0.0 to >=20.19.0 https://claude.ai/code/session_01X3NZHpVLUe4JEuhHi9Gs9f
There was a problem hiding this comment.
Pull request overview
This PR upgrades the monorepo’s ESLint tooling to ESLint v10 and updates the shared ESLint configuration package to use eslint-plugin-import-x (instead of eslint-plugin-import), including a small rule override for compile-test (*.ct.ts) files.
Changes:
- Bump workspace ESLint version to
10.0.3and update the lockfile accordingly. - Update
@repo/config-eslintto use@eslint/js@10and replaceeslint-plugin-importrules/settings witheslint-plugin-import-x. - Add a
*.ct.tsflat-config override to disableno-useless-assignment.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pnpm-workspace.yaml | Bumps the catalog ESLint version to v10. |
| pnpm-lock.yaml | Updates lockfile for ESLint v10 and new dependency graph (incl. import-x). |
| packages/config-eslint/package.json | Moves shared config dependencies to @eslint/js@10 and eslint-plugin-import-x. |
| packages/config-eslint/base.js | Switches plugin key/rules to import-x/* and adds a *.ct.ts override. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
pnpm-lock.yaml:1229
- With ESLint bumped to v10, the lockfile still resolves
eslint-plugin-import@2.32.0, which declares a peer dependency oneslintonly up to^9. This will produce peer dependency warnings (and can break installs in environments that enforce strict peer deps). Ifeslint-plugin-importis no longer needed, consider removing it from the resolved graph (e.g., via pnpm overrides / dependency cleanup) or upgrading/replacing it with a package that supports ESLint 10.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…=22.13.0 - Override eslint-plugin-import to prevent resolution as an optional peer of eslint-import-resolver-typescript (removes 109 unnecessary packages) - Switch to modern createTypeScriptImportResolver API (resolver-next) - Bump engines.node from >=22.0.0 to >=22.13.0 to match ESLint 10 requirements https://claude.ai/code/session_01X3NZHpVLUe4JEuhHi9Gs9f
There was a problem hiding this comment.
Pull request overview
Updates the repo’s linting toolchain to ESLint v10 and migrates the shared ESLint config away from eslint-plugin-import to eslint-plugin-import-x, including resolver changes to match the new plugin/resolver ecosystem.
Changes:
- Bump ESLint to
10.0.3via pnpm catalogs and update the lockfile accordingly. - Switch
@repo/config-eslintfromeslint-plugin-importtoeslint-plugin-import-xand update rule/setting namespaces. - Add pnpm overrides to prevent
eslint-plugin-importfrom being pulled in as an optional peer; raise the repo’s Node engine minimum to>=22.13.0.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Updates ESLint catalog version and adds an override to prevent installing eslint-plugin-import. |
| pnpm-lock.yaml | Lockfile refresh for ESLint 10 upgrade, import-x migration, and overrides. |
| packages/config-eslint/package.json | Replaces eslint-plugin-import with eslint-plugin-import-x and bumps @eslint/js. |
| packages/config-eslint/base.js | Migrates rules/settings to import-x/* and configures resolver via resolver-next. |
| package.json | Raises minimum supported Node version to meet new ESLint dependency engine constraints. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Summary
This PR migrates the ESLint configuration from the deprecated
eslint-plugin-importto its maintained forkeslint-plugin-import-x, and updates ESLint to v10 along with related dependencies.Key Changes
Plugin Migration: Replaced
eslint-plugin-importwitheslint-plugin-import-xthroughout the ESLint configurationbase.jsimporttoimport-ximport/*toimport-x/*import/resolvertoimport-x/resolverDependency Updates:
@eslint/js: 9.39.3 → 10.0.1eslint-plugin-import: 2.32.0 →eslint-plugin-import-x: 4.16.2eslint: 9.39.3 → 10.0.3 (in pnpm-workspace.yaml)New Configuration: Added a new ESLint config block for compile-test files (
*.ct.ts) that disables theno-useless-assignmentrule, as these files intentionally reassign variables for type verification purposesImplementation Details
The migration to
eslint-plugin-import-xis a drop-in replacement that maintains API compatibility while providing ongoing maintenance and support. All rule names and configuration options remain functionally equivalent, requiring only namespace updates fromimporttoimport-x.https://claude.ai/code/session_01X3NZHpVLUe4JEuhHi9Gs9f