Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING: Replace eslint-plugin-import with eslint-plugin-import-x #356

Merged
merged 4 commits into from
Jun 4, 2024

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Jun 4, 2024

eslint-plugin-import has a regression from versions >=2.27.0, meaning we had to pin it to 2.26.x. It also has performance issues when importing large packages, such as prettier or typescript, and seems to use up the majority of the total time ESLint takes to run in most cases.

eslint-plugin-import-x is a fork of eslint-plugin-import and is mostly compatible (after replacing import/ with import-x/ in the configs). It has much better performance, and does not have the same regression as eslint-plugin-import@>=2.27.0.

I'm already using eslint-plugin-import-x in TS Bridge with some patches, and it's working great.

Breaking changes

  • Consumers of the shared ESLint configs will need to remove eslint-plugin-import and install eslint-plugin-import-x instead.
  • Any custom rules or ignore comments for eslint-plugin-import will need to be updated to eslint-plugin-import-x.

@Mrtenz Mrtenz requested review from mcmire and legobeat June 4, 2024 17:45
@Mrtenz Mrtenz requested review from a team as code owners June 4, 2024 17:45
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/eslint-plugin-import-x@0.5.1 None 0 631 kB jounqin

View full report↗︎

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Seems like a good idea to me! I am looking forward to the improved performance (linting core is awfully slow).

@Mrtenz Mrtenz merged commit de2b120 into main Jun 4, 2024
15 checks passed
@Mrtenz Mrtenz deleted the mrtenz/eslint-plugin-import-x branch June 4, 2024 20:11
Mrtenz added a commit that referenced this pull request Jun 4, 2024
Mrtenz added a commit that referenced this pull request Jun 4, 2024
Mrtenz added a commit that referenced this pull request Jun 4, 2024
#356)

* Replace `eslint-plugin-import` with `eslint-plugin-import-x`

* Update READMEs

* Fix local ESLint config

* Update lockfile
Mrtenz added a commit that referenced this pull request Aug 16, 2024
#356)

* Replace `eslint-plugin-import` with `eslint-plugin-import-x`

* Update READMEs

* Fix local ESLint config

* Update lockfile
Mrtenz added a commit that referenced this pull request Aug 16, 2024
#356) (#366)

* Replace `eslint-plugin-import` with `eslint-plugin-import-x`

* Update READMEs

* Fix local ESLint config

* Update lockfile
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.

2 participants