-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
-
-
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
pathGroupsExcludedImportTypes
must be set to an empty array?
#2291
Comments
It would help if you made a PR with failing test cases. I don't see why we'd want to respect It makes sense that |
Ok then that's a bug. Because neither work. And
I would think it's simply a matter of setting the default value to |
Yes, I’d think so. |
I have the same issue, and I had to add an empty array for |
The documentation specifies that the default value for also, in the code it looks like the default is actually ["builtin", "external", "object"] what was the reason for using |
It depends. To whom does it make sense to have anything in that array? Because it's so vague as to what it's for, I seriously doubt many people will be needing it.
What was the reason for having this property at all? 😉 |
Here's the relevant bit of our config:
This works, I think. But I fail to understand why. The
pathGroups
, I assume, tellsimport/order
the patterns that belong tointernal
imports.But then why would I ever need to specify the
position
as well? Surely this is handled bygroups
already? 🤨Also why does this only work when
pathGroupsExcludedImportTypes
is an empty array? I cannot understand for the life of me what that thing actually does. But it has to do withpathGroups
, in some way or another, so I just started guessing at its value. The documentation is incredibly vague on this. Something is excluded - what is exlcuded, and from what? And what effect does it have on import order, and why?Lastly, I shouldn't have to use
pathGroups
in the first place. This is a workaround for the fact that even with a parser that understandsjsconfig.json
ortsconfigjson
, after 2 years it still doesn't see that these aliased paths actually belong tointernal
. I haven't looked at the code, but it feels likeimport/order
way of deterining what sort of import is external vs internal, is hardcoded, instead of taken from any kind of configuration to speak of.I'd like to keep my configs DRY, but that seems impossible with this plugin. Can we get this fixed please?
Recap:
position
shouldn't be neccesary - handled bygroups
order.pathGroupsExcludedImportTypes
is vague:pathGroups
to "assign" certain paths to a groupjsconfig.json
ortsconfig.json
. Using one of these is the defacto standard to configure path aliases. And ESLint is aware of these when using a parser that requires them.The text was updated successfully, but these errors were encountered: