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

A flag for disabling file import organization #1

Open
krishnagopinath opened this issue Apr 12, 2021 · 1 comment
Open

A flag for disabling file import organization #1

krishnagopinath opened this issue Apr 12, 2021 · 1 comment

Comments

@krishnagopinath
Copy link

Hey, thanks for this great lib!

I was wondering if there was a possibility of adding a flag to disable module ordering feature in the lib. This is because my project has its own little mechanism to deal with it and this conflicts with that.

It could be turned on by default but disable it by passing a flag.

Happy to open a PR to this repo if you don't have the time! This is just me trying to see if this feature aligns with your goals for this library.

@krishnagopinath krishnagopinath changed the title A flag for file import organization A flag for disabling file import organization Apr 12, 2021
@Roaders
Copy link
Owner

Roaders commented Apr 12, 2021

I am a bit hesitant as we rely on the import organisation to clean up. When we're moving code around we move all the imports for that file to the new location. This inevitably means we're moving more imports than we need. We then rely on the tidy import code to remove the unnecessary ones. This could also lead to files that empty except for a few imports being left that would otherwise have been deleted.
I could add it with a warning that it might lead to messy imports and with a recommendation that this step is performed in another way. I am not sure what you will do about removing empty files though.

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

No branches or pull requests

2 participants