-
Notifications
You must be signed in to change notification settings - Fork 141
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
Ianvs prettier plugin sort imports #122
Ianvs prettier plugin sort imports #122
Conversation
Will take a look at this soon. It doesn't appear to work in the tests so there might be something else going on or the test needs to be tweaked for this plugin. |
Awesome. Yeah, normally I would have contributed to this on my machine but I've been away for a while and busy with various things. I don't think I'll have time to fix it any time soon. To be honest, it sort of bugs me when someone forks something to add their feature then keep adding to it without contributing to the original fork. :(. But it does have a feature that is really important for a lot of people. We use side-effect imports at a top level to prepare environment variables, etc. Most use it for polyfils, etc, so it should really exist in the original sorting plugin. Thanks for taking a look at it. |
Alright I figured out what was wrong there. We were testing using import "./foo" which is a side-effect import ovbs so I tweaked the tests to account for that. Thanks! |
Haha, that makes sense. Well this is awesome to see. Thanks so much. Cheers! |
@thecrypticace I would normally agree. However, the trivago plugin is barely maintained, so improving it was not really possible. By working on the fork, we can keep pushing forward and give people options of which one to use. Glad you've found it useful! We're about to release a breaking change to simplify options and improve defaults. Would love if you were willing to try it out by installing it with |
I edited this in GH so commits aren't squashed, but yolo.
@ianvs/prettier-plugin-sort-imports fork has been better and preserves order of side-effect imports.