Skip to content

Migrate to eslint-plugin-import-x and update ESLint#7

Merged
drdxk merged 3 commits into
mainfrom
claude/research-eslint-10-gkbha
Mar 14, 2026
Merged

Migrate to eslint-plugin-import-x and update ESLint#7
drdxk merged 3 commits into
mainfrom
claude/research-eslint-10-gkbha

Conversation

@drdxk

@drdxk drdxk commented Mar 14, 2026

Copy link
Copy Markdown
Owner

Summary

This PR migrates the ESLint configuration from the deprecated eslint-plugin-import to its maintained fork eslint-plugin-import-x, and updates ESLint to v10 along with related dependencies.

Key Changes

  • Plugin Migration: Replaced eslint-plugin-import with eslint-plugin-import-x throughout the ESLint configuration

    • Updated import statement in base.js
    • Updated plugin registration from import to import-x
    • Updated all rule references from import/* to import-x/*
    • Updated settings from import/resolver to import-x/resolver
  • Dependency Updates:

    • @eslint/js: 9.39.3 → 10.0.1
    • eslint-plugin-import: 2.32.0 → eslint-plugin-import-x: 4.16.2
    • eslint: 9.39.3 → 10.0.3 (in pnpm-workspace.yaml)
    • Node.js minimum version: >=20.0.0 → >=20.19.0
  • New Configuration: Added a new ESLint config block for compile-test files (*.ct.ts) that disables the no-useless-assignment rule, as these files intentionally reassign variables for type verification purposes

Implementation Details

The migration to eslint-plugin-import-x is 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 from import to import-x.

https://claude.ai/code/session_01X3NZHpVLUe4JEuhHi9Gs9f

- 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
Copilot AI review requested due to automatic review settings March 14, 2026 22:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.3 and update the lockfile accordingly.
  • Update @repo/config-eslint to use @eslint/js@10 and replace eslint-plugin-import rules/settings with eslint-plugin-import-x.
  • Add a *.ct.ts flat-config override to disable no-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 on eslint only up to ^9. This will produce peer dependency warnings (and can break installs in environments that enforce strict peer deps). If eslint-plugin-import is 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.

Comment thread pnpm-workspace.yaml
claude added 2 commits March 14, 2026 22:22
…=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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.3 via pnpm catalogs and update the lockfile accordingly.
  • Switch @repo/config-eslint from eslint-plugin-import to eslint-plugin-import-x and update rule/setting namespaces.
  • Add pnpm overrides to prevent eslint-plugin-import from 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.

@drdxk drdxk merged commit cdc4a89 into main Mar 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants