-
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
Handle custom groups #24
Comments
Yep. Sounds like a duplicate. |
I’m not sure what you mean – what is your possible solution idea more in detail? (I’m closing the issue since it is a duplicate, but feel free to answer here or in the other one.) |
Thus the problem could be solved without any configuration needed from a user. |
This is now possible in v5.0.0 using For example: {
"rules": {
"simple-import-sort/sort": [
"error",
{
"groups": [["^\\u0000"], ["^@?\\w"], ["^components(/.*|$)"], ["^\\."]]
}
]
}
} |
Nowadays, absolute imports is a very popular thing, as well as monorepos with different features "stored" as a separate packages. However they are not packages.
Webpack aliases and yarn workspaces are breaking original idea behind the "groups" feature.
Technically these are:
node_modules
node_modules
2
could be distinguished from1
by callingrequire.resolve
and checking path to includenode_modules
(obvious)2
could be distinguished from1
by having some configuration rules, but I reckon it's not feature proof and quite fragile.I could work on PR if you'll accept the idea
The text was updated successfully, but these errors were encountered: