-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Proposal: new-line-between-groups
option for order
#282
Comments
I will mostly defer to @jfmengels and company on this one, but a few gut reactions: I think if you don't set the option at all, it shouldn't enforce any spacing. Also, if you do set it, to either setting, would it enforce that there are no newlines within a group? i.e. import url from 'url';
// assuming this were a blank line, would it be reported? "extra newline inside group" or some such
import express from 'express'; Also I think it would be optimal if the option were one or two words, something like |
👍
I think so yes. Maybe we could specify the number of blank lines between groups?
I think |
Yep, then it's do
Yes, this is what I had in mind.
Personally I don't think it's necessary, especially at the beginning. We might add it later :) |
One of the things it brings is make the option setting clearer IMO (well, depending on the name of the option...). |
I like starting with New name idea: |
I think I like |
@jfmengels Depends how to look at that - you can interpret it like: if you will have more than two groups then you will have newlineS between groups - even if it will be one line between group, total amount of empty lines in imports section will be bigger than 1, thus I'm ok with plural form :) |
So, can I assume it's something which would be ok with you guys and I can try to prepare a PR? |
I'd wait for an explicit 👍 from @jfmengels but I'm good with where we ended up, discussion-wise. |
Same here 👍 |
This follow up on discussions we had here and #246.
Options for that would be either
always
ornever
.Then for
always
and groups like:groups: [ [ "builtin", "external" ], [ "index", "sibling", "parent" ] ] }
So the following would be considered as a problem:
This would not be considered as a problem:
new-line-between-groups
would allow you to configure new lines inside groups like you want - should be pretty flexible.I don't think there should be another rule for achieving that, option for
order
IMHO would be fine.NOTE: Option name could of course be changed to something different,
separate-groups(-with-newline)
maybe.The text was updated successfully, but these errors were encountered: