Skip to content
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

Merged
merged 7 commits into from
Feb 10, 2023

Conversation

j
Copy link
Contributor

@j j commented Feb 9, 2023

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.

@thecrypticace thecrypticace self-assigned this Feb 10, 2023
@thecrypticace
Copy link
Contributor

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.

@j
Copy link
Contributor Author

j commented Feb 10, 2023

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.

@thecrypticace thecrypticace merged commit f9b249b into tailwindlabs:main Feb 10, 2023
@thecrypticace
Copy link
Contributor

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!

@j
Copy link
Contributor Author

j commented Feb 10, 2023

Haha, that makes sense. Well this is awesome to see. Thanks so much.

Cheers!

@IanVS
Copy link

IanVS commented May 18, 2023

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.

@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 @next. And please submit any questions or issues you come across.

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.

3 participants