-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
The future of this fork/plugin #24
Comments
when i was considering forking the same plugin, i came to the conclusion it makes more sense to diverge than staying in sync. there's a lot of extra logic, architecture, etc that could easily fall away these days IMO. i'd rather you make it independent so you can be set free on it rather than working within constraints of the original plugin just my two cents if you need any help, too, i'd be happy to. i work on a fair amount of things in the eslint ecosystem and was about to do my own fork until i discovered this one! |
Benefits
Downsides
|
eslint-plugin-import has been missing a real update for years. We should take this opportunity to drop all Node.js <= 14 support. |
Yes, we'll rewrite the whole code base into modern JavaScript/TypeScript features. Do you want to join to maintain this project? Next steps:
|
a few things i think could be cleaned up or thrown away too:
i don't believe there's any need for this resolver architecture anymore. feels like an over-complication of things, especially splitting them out into independent packages. i think you should be able to use this plugin and it supports every day resolution out of the box (standard resolution browsers/node-esm use, and node resolution). anything else is an edge case you could support through config, but definitely don't need an extra package for. if we use enhanced-resolve, that itself is configurable for all those cases. doesn't seem to be a reason to have resolvers anymore, just configure enhanced-resolve differently for those edge cases. |
And that's why I'm using I mean the new plugin will be a TypeScript-first plugin. |
Just want to leave my opinion here. I really like the idea of rewriting everything to TS and enhance the project in a good way. Right now I don't feel like that I can over much time 🙁 Another thing: I dislike the plugin-name "i", because it is not clear what "i" means. Is it possible to e.g. publish as |
The idea of Personally, I don't think we should rename to a new brand considering it's already a little bit well known. |
I also hate |
I don't think anyone would use
|
To clarify, eslint-module-utils is a separate package; the repo is a kind of hybrid monorepo. You’re right about the memo parser, that isn’t used. A great many users need the webpack resolver, or use the plugin with ecosystems that don’t use standard node resolution, so just be aware of who’s being excluded if you choose to drop the concept of resolvers. |
i don't believe we need a resolver architecture/plugin system for that nothing is stopping us providing configurable resolution using a single built-in resolver. i think it was an over-engineering of a much simpler thing. enhanced-resolve plus some configuration will achieve everything we need. just my opinion though. sure you believed the opposite when you built it, which is fair enough. each to their own |
I didn’t build it. |
|
I've started the migration at #26 |
Really glad to see someone start fork it, I had really bad experience contribute to the original repo once, and decide never do it again..
Same here. |
Progress: I've successfully removed all |
Do you think I own @eslinter but I don't know how to join @eslint-community, and Although it's too late as @bradzacher said, but we still have the chance. Another interesting thing is that, I own https://github.com/eslinter/eslint-plugin-jsx and the npm package now, so I'll start to adapt @jsx-eslint packages like https://github.com/jsx-eslint/eslint-plugin-react into I really hope @Rel1cx can join in this case. |
doing such good work already 🙏 ill have a read through the PR this weekend if i can on the naming - i do agree it'd be nice if it had a "full" name (rather than the eslint community org would be good to put this into but you're right that the scope is pretty lengthy. even if you don't adopt that name, it may still be worth joining that org on github though (assuming it is "official" and actively managed, and doesn't remove any ownership from you). |
Any chance to have eslint-plugin-module or eslint-plugin-modules? |
@fisker I'll try to contact these two package owners. |
|
Does It should be |
Yes. The users can always use the plugin full name or |
Great rule name! 😄 |
did you already start this? i have a branch lying around which does a bunch of it from what i remember if you want any help, ping me when you make the repo and i'll push the branch for you to look at, at least (don't want to take this thread off topic so lets catch up once the repo exists rather than here) |
@JounQin true, because that makes it useless for preact and svelte and vue and styled-components etc users. |
I haven't personally, but I know a great project https://github.com/Rel1cx/eslint-react, that's why I said I really hope @Rel1cx can join us. |
I strongly support you to do a full rewrite of eslint-plugin-import, maybe called eslint-plugin-esm + eslint-plugin-cjs (two separate packages), or eslint-plugin-module (one package). |
@Rel1cx In my view, some rules are universal, some rules are framework specific. For react rules, we can have So in |
You could make an eslint-plugin-jsx but that only makes sense if the rules in it are truly framework-agnostic, and considering that most of the natural framework-agnostic rules have already been migrated to @stylistic/eslint-plugin-jsx, there aren't that many left. Where JSX fits into the ecosystem of front-end languages and frameworks: JS in Vue JS in Solid ... In essence, JSX is just a syntax extension, how to lint TSX here is the same as TS, JS here, it's up to the frameworks, making an eslint-plugin-jsx that doesn't just take care of the correctness of JSX itself, but also has to be configured (or prefixed) to support the behaviour of all the specific frameworks that have used JSX in the past, are using JSX now, and will be in the future is equivalent to making a @typescript-eslint/eslint-plugin but not only for the correctness of TS itself but also configured (or prefixed) to support the behaviour of all the frameworks that use TS, React, Preact, Solid, Vue, etc. Don't think of JSX as anything special, it's basically the same thing as JS and TS. |
Just my two cents, I roughly agree.
|
OK, like @jsx-eslint, I own @eslint-jsx, we can make framework specific plugins at that org. |
Progress:
|
After thinking, I think |
i think that makes sense, since future forks of other plugins could follow the same naming convention too. nice to have some consistency there |
I've published eslint-plugin-import-x as the successor of The whole progress was tough, #26 was unable to continue because I chose to migrate codes instead tests first. But finally I migrated But I haven't removed the In the next step, I'll try to migrate the whole code base into TypeScript. |
$ yarn add -D eslint-plugin-import-x # due to un-ts/eslint-plugin-import-x#24 $ sed -i "s@(:|')import/@\1import-x/@" .eslintrc.cjs @ fe
$ yarn add -D eslint-plugin-import-x # due to un-ts/eslint-plugin-import-x#24 $ git ls-files -z | xargs -0 sed -i "s@(:|'| )import/@\1import-x/@" @ fe
$ yarn remove eslint-plugin-import $ git ls-files -z | xargs -0 sed -i "s@(:|'| )import/@\1import-x/@" @ fe
We'll consider using eslint-plugin-import-x in the next major version, #3 We remove this plugin to avoid issues like this: pnpm/pnpm#4619 (should be resolved when ESLint v9 is fully supported) And because of the lack of features, that eslint-plugin-import-x implement: (un-ts/eslint-plugin-import-x#24 (comment))
See un-ts/eslint-plugin-import-x#24, and the references therein, for context. This is also required to support ESLint 9.
See un-ts/eslint-plugin-import-x#24, and the references therein, for context. This is also required to support ESLint 9.
See un-ts/eslint-plugin-import-x#24, and the references therein, for context. This is also required to support ESLint 9.
See un-ts/eslint-plugin-import-x#24, and the references therein, for context. This is also required to support ESLint 9.
See un-ts/eslint-plugin-import-x#24, and the references therein, for context. This is also required to support ESLint 9.
I'm thinking about maintaining this package as a complete independent plugin from upstream because a lot of issues can not be fixed easily without API changes, see
import-js#1479
import-js#2108
import-js#2111
import-js#2717
It would affect 3rd party resolvers like import-js/eslint-import-resolver-typescript#248
@SukkaW do you want to collaborate here?
The text was updated successfully, but these errors were encountered: