-
-
Notifications
You must be signed in to change notification settings - Fork 3
Is it possible to disable alphabetical sorting ? #29
Comments
I suppose that might be possible with a new switch... but I'm a bit hesitant because there are some relatively new options added that ask for sorting... and I'm wondering what the expectation would be if one of those other options (like And if I change the options, then how would backwards compatibility be handled? I'll leave this issue open for a while before taking action since it is not clear to me how to incorporate this nicely. Also, it will give a chance for others to comment... let's see how much interest there is in this request. One other thought is that this thing is supposed to be very opinionated, and now we are thinking of removing its opinions. 😂 |
The grouping part is really nice, it's just the sorting within the group that can be inconvenient. For example, if you have named parameters in a certain order, you may want the fields to be declared in the same order. Or you may want to have some methods declared in a certain order because they have some kind of hierarchy. I think we could add an option "disableSorting": [
"named-constructors",
"public-static-variables",
"public-instance-variables",
"public-override-variables",
"private-static-variables",
"private-instance-variables",
"public-override-methods",
"public-other-methods",
"private-other-methods",
], For backwards compatibility:
What do you think ?
Hopefully it will still have opinions about the grouping part 😂 |
Overall, this definitely sounds interesting... but there is one remaining slight snag... It would be nice to come up with a consistent behavior that is customizable without causing too much churn. My biggest concern is changing the behavior and having someone's entire project suddenly get thousands of lines changed in a PR because the stylizer is now acting differently. |
They still won't be sorted by default. The But I understand that the changes could be quite confusing for the users. |
Hello,
I want the extension to group the different class members, constructors... without sorting them alphabetically. It would instead preserve their initial order. Is this possible ?
The text was updated successfully, but these errors were encountered: