Repository navigation
Reformat imports to be one identifier per line - #51565
Merged
Jake Bailey (jakebailey) merged 6 commits intoNov 17, 2022
Merged
Conversation
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a design meeting before modules, we decided that we would start by "doing nothing" to solve our import sorting problem, leaving them as roughly 120-wide blocks and just let auto-import do whatever.
That unfortunately has caused merge conflicts to happen, and while we knew that would happen, it seems to be worse than expected.
So, let's try doing one import per line.
Unfortunately, there is no eslint rule that would allow us to do this; the best we can do is to sort the imports once they are there, but that won't reformat them to match this format. All of the lint rules defer to prettier/dprint/etc, and we still haven't come to a conclusion on that front, as much as I would like that to be done and done.