-
Notifications
You must be signed in to change notification settings - Fork 45
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
Feature: sort-modules in order of use #434
Comments
That sounds interesting. Perhaps it should be a new type of sorting. But currently I don't have any idea yet how it should work for other rules. |
I think that a rule like that would be almost exclusive to
They are two ways to approach this in my opinion:
In both cases:
|
Thanks for the responses! @hugop95 In you final example, I would expect groups to take priority unless the user has configured dependency sorting to take priority. That way, you don't have any breaking changes for the existing rule. If I can help with this in any way, let me know! |
Here is a non-exhaustive list of things that we should consider before implementing anything:
|
What rule do you want to change?
sort-modules
Describe the problem
I like the idea of this rule, but I prefer to keep my code in the order that it's used. In the code example below, the rule wants to place
SortJsonOptions
belowPrettierConfig
where the interface is used. It is possible to have the rules sort in order of use first, and normally after that?Code example
Additional comments
No response
Validations
The text was updated successfully, but these errors were encountered: