Skip to content

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

Merged
Mrtenz merged 4 commits intomainfrom
mrtenz/eslint-plugin-import-x
Jun 4, 2024
Merged

BREAKING: Replace eslint-plugin-import with eslint-plugin-import-x#356
Mrtenz merged 4 commits intomainfrom
mrtenz/eslint-plugin-import-x

Conversation

@Mrtenz
Copy link
Copy Markdown
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 legobeat and mcmire June 4, 2024 17:45
@Mrtenz Mrtenz requested review from a team as code owners June 4, 2024 17:45
@socket-security
Copy link
Copy Markdown

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
Copy Markdown
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
@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