-
-
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
Adding new group types and matching pattern for sort order #1076
base: main
Are you sure you want to change the base?
Conversation
Absolute has a meaning, this seems fine. I have no idea what “private” means, nor why it needs to be a default group when you can create custom ones. Either way, please update the documentation to describe all your changes. |
@ljharb How can we create custom types? May be I missed it in docs. But right now I only see I created them because I thought we can't create custom ones. And my idea was to separate I think you are right that we don't need them as a default. I will update docs accordingly. |
Ah, you’re right, I’m thinking of a different rule in a different plugin. What would you expect “private” to mean, given that this isn’t a standard concept in node? |
@ljharb As I said before in my idea |
1fcb2d0
to
8691ddf
Compare
I think something wrong with your CI because locally all test completes successfully. |
@6graNik FWIW, when I run the tests on your branch I get the same errors that are happening in the CI. |
9b25f48
to
28ba389
Compare
This PR would solve my use case, which is to group company projects. There are some corner cases, which can only be solved by being able to register a group via regex. Any progress on this? |
@ljharb thanks for the response and pointing me to this issue. Is there something that needs to be done to get this in? Anything I can do to help? |
See #1076 (comment) In other words, I'm fine to add builtin groups that have a reasonable universal meaning; "private" has none. |
@ljharb after reading the docs again and reading the source for the order rule, can you correct me if I'm wrong? Does the "internal" group refer to things that basically look like node modules (no relative paths or whatever) but don't exist in the node_modules folder? If so, I think that group solves the Typescript alias problem and we wouldn't require any changes to switch to this. |
If your concern only, about naming, we can defenatly change it from private to whatever. I am not a native English speaker, so may be someone could suggest any proper naming. Basically we want to add opportunity to group "some" imports, to separate them from other predefined ones. I need it to group some out company projects. |
This comment has been minimized.
This comment has been minimized.
@6graNik you can create a custom group already; why is that not sufficient? |
@ljharb is that documented somewhere? |
ah, perhaps not; in which case, would a feature to create custom groups be a better solution for this? |
I added support for couple of new types.
One that was internally used
absolute
and one newprivate
They both for more flexible order customazing, we need it in our project and I thought maybe some one else will need it to.
Both properties have on pattern field that except regex.