-
-
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
[import/order] Fix alphabetize bug with newlines-between #1562
Conversation
Linking to #1561 in case anyone else is working on a PR for the same issue. |
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.
Thanks!
Any chance we can get a version |
Waiting for import-js/eslint-plugin-import/pull/1562 to be released.
@ljharb what do you think about cutting a |
It remains on my list of things to do; there's still something i'm the middle of fixing on this repo first. |
Sounds good, thanks |
v2.20.0 is released. |
Hello!
I tested the new
alphabetize
rule, and when used withnewlines-between: "always"
, the plugin mark as invalid any lines which have not newline around.For example :
These lines are OK with this plugin configuration (1) :
but are invalid with this plugin configuration (2) :
And the configuration (2) mark these lines as valid :
I checked the alphabetize PR, and I saw this comment which is exactly the bug I have.
The next comment gives a solution to the problem.
So I just implemented the solution, and I also add the associated test.
Fixes #1561.