-
-
Notifications
You must be signed in to change notification settings - Fork 2
feat: migrate to import-x
with lighter deps and better performance
#129
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
base: main
Are you sure you want to change the base?
Conversation
Before moving away from a well established plugin for a fork, could you give me a bit more context? I understand it says import-x is lighter and faster, but could you explain how? Ultimately, can you share the discussions that motivated you guys to create this fork, and why was it not possible to achieve the same in the original project? |
@acelaya See also un-ts/eslint-plugin-import-x#24, un-ts/eslint-plugin-import-x#40, un-ts/eslint-plugin-import-x#208
|
Thanks! I'll take a look at those threads, but a couple more questions. If import-x is supposed to be faster, are there any benchmarks published somewhere that support this statement? If import-x is supposed to have a lighter dependency footprint, how come this PR is adding a bunch of new dependencies when it is removing When you say And ultimately, would this have helped on the issue you helped me solve, for which you provided this PR? shlinkio/shlink.io#923. I guess un-ts/eslint-plugin-import-x#208 partially answers this question. |
We haven't add such benchmarks, some theory proof (we'd add benchmarks indeed):
But the way, you can just try
Because you have other plugins also maintained by
And also https://github.com/SukkaW/nolyfill
Well, see
Not sure to understand, your previous has already been resolved without migrating, this PR aims performance. |
There in no |
Thanks! That's a super detailed explanation. Now I need some time to go over those threads. Also, I want to test the changes in downstream projects (this is a shared configuration I use in a bunch of places), before making a decision.
I suppose with this you mean that removing I suppose, if this was merged, I would want to migrate those as well, to their more lightweight alternatives.
Yeah, sorry, that was a bit vague. What I meant is that, in that PR you provided some extra eslint config that was aiming to solve some importer-related issues, when used in combination with astro files. My question is, if using import-x would have made that process simpler in any way? At least I see configuring the resolvers seems a bit more straightforward here. |
That doesn't change the parsers concept for parsing modules, so those changes are still needed. We may change default |
@acelaya
https://github.com/import-js/eslint-import-resolver-typescript supports both js and ts, and
exports
.See also https://github.com/un-ts/eslint-plugin-import-x