-
-
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
Rule proposal: no-empty-line-separating-import #172
Comments
Just a heads up: if you want to implement + PR this and the others you've proposed, I'm more than willing to accept them. I just don't have a lot of time ATM and the style-guide rules are lower priority than getting ready for ESLint 2, infrastructure, etc. so I don't expect to work on them any time soon. |
@benmosher maybe rename |
You can configure the order rule to do the wanted behavior. It's a but of a hack if you only want to enforce this trait, but that would be the way to go IMO. What do you think @benmosher? |
I'm cool either way. Seems reasonable to assume that intent to use a rule like this implies desire to use |
That assumption is incorrect - I do not want ordering but do want imports grouped with no newlines. |
I agree with ↑, https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md#newlines-between-ignorealwaysalways-and-inside-groupsnever lets ignore the oh.. right, after reading more:
works to allow mangling of all groups |
@benmosher @ljharb Is this issue still open to take up? I don't see any PR created for this rule, so I was hoping to take a shot at implementing this if it's something useful to have 😅 For starters, I'm thinking of going through the code for Though, I'll need some input from your end to get some clarity on the implementation as well as what options we could configure for this rule 😅 |
@Devansu-Yadav yup! no PR yet. altho let's make sure we're on the same page about implementation first. |
Sure, absolutely! |
@ljharb Any updates on how I should be proceeding with the implementation? |
What schema did you have in mind? |
As this rule mostly deals with having no newlines between import statements, having a I'm not sure if it would be useful to only enforce no newlines inside import groups using the I'm also thinking about whether we should have an option like |
Any thoughts on this? @ljharb |
I thought I would weigh in on this one - I would love if this were part of the I see a couple of potential options:
|
This is stylistic rule. I often see import statements separated one from another using arbitrary rules, e.g.
This rule would enforce no spacing between import statements, i.e.
The text was updated successfully, but these errors were encountered: