-
Notifications
You must be signed in to change notification settings - Fork 66
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
Wrong grouping of imports? #26
Comments
Hi! The plugin identifies three groups of imports in your piece of code:
The stuff in the middle group aren’t relative imports, because they don’t start with a
The sorting and grouping is explained in more detail here: https://github.com/lydell/eslint-plugin-simple-import-sort#sort-order I suspect that the imports starting with If you have any ideas on how to improve this besides #18, let me know! Do keep in mind though that I’m trying hard to avoid adding options to this plugin. |
Thank you for your quick explanation. I am looking forward to when #18 will get implemented. Also about group sorting in readme - I read it before but it was not clear to me that it will sort it like in my example above, because in my head my aliased package names are not npm packages |
I see! To all tools/programs, though, they are, because how would they know? That’s why I’m hoping that the tsconfig.json/jsconfig.json approach in #18 will be good – it will allow many tools/programs at once to know your setup without having to configure all of them separately. |
v5.0.0 has just been released, and it groups v5.0.0 also has a For example: {
"rules": {
"simple-import-sort/sort": [
"error",
{
"groups": [
["^\\u0000"],
["^@?\\w"],
["^(@gql-schema|@ui|@util|@styles)(/.*|$)"],
["^\\."]
]
}
]
}
} |
Hi I have these imports:
Sort plugin reports them as wrong and it will correct them to the:
i would expect all imports starting with
@
to be in same group. Could you provide explanation how this was sorted?Thank you
The text was updated successfully, but these errors were encountered: