Skip to content

chore: migrate eslint-plugin-import to eslint-plugin-import-x #11217

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JounQin
Copy link
Contributor

@JounQin JounQin commented May 14, 2025

PR Checklist

Overview

Before:

 typescript-eslint on  main ❯ TIMING=1 y eslint .
Rule                                               | Time (ms) | Relative
:--------------------------------------------------|----------:|--------:
@typescript-eslint/no-unsafe-assignment            |  5458.780 |    22.9%
@typescript-eslint/internal/plugin-test-formatting |  3047.222 |    12.8%
@typescript-eslint/no-floating-promises            |  2288.399 |     9.6%
@typescript-eslint/no-misused-promises             |  2215.349 |     9.3%
@typescript-eslint/no-unsafe-return                |  1609.052 |     6.8%
@typescript-eslint/no-deprecated                   |  1049.075 |     4.4%
@typescript-eslint/no-unsafe-argument              |   954.879 |     4.0%
@typescript-eslint/no-unsafe-member-access         |   528.152 |     2.2%
import/no-duplicates                               |   501.363 |     2.1%
perfectionist/sort-objects                         |   373.923 |     1.6%
via .NET via  v24.0.1 took 1m13s
 typescript-eslint on  chore/import-x [+] ❯ TIMING=1 y eslint .
Rule                                               | Time (ms) | Relative
:--------------------------------------------------|----------:|--------:
@typescript-eslint/no-unsafe-assignment            |  3212.736 |    15.9%
@typescript-eslint/internal/plugin-test-formatting |  3052.515 |    15.1%
@typescript-eslint/no-floating-promises            |  2319.146 |    11.5%
@typescript-eslint/no-misused-promises             |  2253.580 |    11.2%
@typescript-eslint/no-unsafe-return                |  1785.357 |     8.9%
@typescript-eslint/no-unsafe-argument              |   932.104 |     4.6%
@typescript-eslint/no-deprecated                   |   906.925 |     4.5%
@typescript-eslint/no-unsafe-member-access         |   528.508 |     2.6%
@typescript-eslint/no-unnecessary-condition        |   321.524 |     1.6%
perfectionist/sort-objects                         |   298.678 |     1.5%
via .NET via  v24.0.1 took 1m8s

For a single ESLint plugin migration, I believe from 1m13s to 1m8s is already good enough, and it founds a false positive that @docusaurus/plugin-content-blog should be listed in dependencies for website, because eslint-plugin-import-x is a TypeScript rewrite started at un-ts/eslint-plugin-import-x#42 and we fixed several hidden bugs thanks to TypeScript!

(I don't know why nx complains about react-helmet-async version incompatible with @docusaurus/core's, see also https://app.unpkg.com/@docusaurus/core@3.7.0/files/package.json#L63, so I'm locking it same way to make nx happy.)

cc @JoshuaKGoldberg

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @JounQin!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented May 14, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 36cf5b1
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/683dafbc4dea81000810e7d5
😎 Deploy Preview https://deploy-preview-11217--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🟢 up 2 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (🟢 up 2 from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

nx-cloud bot commented May 14, 2025

View your CI Pipeline Execution ↗ for commit 36cf5b1.

Command Status Duration Result
nx test eslint-plugin --coverage=false ✅ Succeeded 5m 1s View ↗
nx run-many -t typecheck ✅ Succeeded 2m 13s View ↗
nx run integration-tests:test ✅ Succeeded 45s View ↗
nx test typescript-estree --coverage=false ✅ Succeeded 19s View ↗
nx run-many -t lint ✅ Succeeded 12s View ↗
nx test eslint-plugin-internal --coverage=false ✅ Succeeded 7s View ↗
nx run types:build ✅ Succeeded 10s View ↗
nx run generate-configs ✅ Succeeded 12s View ↗
Additional runs (27) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-06-02 14:16:52 UTC

@JoshuaKGoldberg
Copy link
Member

@JounQin those statistics look surprising to me. All lint rules are slower in the second one. Why would that be the case?

I'm out traveling and can't do much testing at the moment, otherwise I'd post some hyperfine statistics.

@JounQin
Copy link
Contributor Author

JounQin commented May 30, 2025

I don't know, eslint-plugin-import-x is powered by @typescript-eslint/utils under the hood, eslint-plugin-import is wrote without top level tools.

Copy link

codecov bot commented May 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.91%. Comparing base (9d46857) to head (36cf5b1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11217   +/-   ##
=======================================
  Coverage   90.91%   90.91%           
=======================================
  Files         501      501           
  Lines       50869    50869           
  Branches     8382     8382           
=======================================
  Hits        46248    46248           
  Misses       4606     4606           
  Partials       15       15           
Flag Coverage Δ
unittest 90.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JounQin JounQin force-pushed the chore/import-x branch 3 times, most recently from 1ba71ac to fc1ebc7 Compare May 31, 2025 06:46
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.

Repo: migrate eslint-plugin-import to eslint-plugin-import-x
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy