-
-
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
Added support for correctly ordering unknown types e.g. custom aliases #1375
Conversation
1 similar comment
I’m a bit confused - what code is generating “unknown”? Is this a type that we’ve always generated but simply not allowed to be in the config list? |
Yes, it seems like this is exactly the case. |
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.
Simple semver-minor, thanks
Thanks! Can you tell when the new version will be released? |
i can't, no, but this PR will be in the next one, whenever that is :-) |
We figured out that the auto-fix feature of the "order" rule destroyed our custom imports which are using a custom
babel-module
resolver. Settings for the resolver:Until now, unknown import types were sorted problematically by the "order" feature. These were not assigned to a common group but loosely added or kept between the other imports. This was especially problematic when using the 'newlines-between'-feature. In this case there was an additional line feed after each unknown import. See examples below.
Example:
Previous version output:
New version output:
I updated the docs accordingly, added new tests and made sure that nothing else broke. The change itself is pretty small but it dramatically changes the result for these situations.