-
Notifications
You must be signed in to change notification settings - Fork 281
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
Imports: implement contiguousGroups logic #2719
Conversation
f5d0d92
to
88b5711
Compare
@tgodzik thoughts on this? |
docs/configuration.md
Outdated
group at the end). Regular expressions are applied to the entire parent domain | ||
of the import statement, up to and including the final dot. | ||
- `rewrite.imports.contiguousGroups` (since v3.0.2): | ||
- if `no` (default), grouping will happen on all imports within the same |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would honestly make it a default and not even add a setting for this. There is a high chance that val
or something else between imports is there on purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can make it default but in our codebase, we prefer to take imports spread out around the file and put them in one place. users can define their vals and then import everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ach, ok, it makes sense. But I think the default should be to not touch it, that's the safer side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed the default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome thanks!
Fixes #2718.