Priority attribute names for useSortedKeys #7639
bimoware
started this conversation in
Rule suggestion
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
useSortedKeys use alphabetical order for sorting attributes on an object
Example:
Would it be possible for us to have a "priority list" ? This way, we could have a list of attribute names that will always be at the top when auto-fix ordering, THEN the rest are treated as normal:
Example:
["id","name"]
being a priotity list in the options"id" before "name" since id is at the start of the priority array.
Do you guys think this a good idea?
If this gets implemented, it would be perfect for my codebase since my objects look ugly with it, but I don't want to disable it since i'm a perfectionnist and I do want all my temperary "exercise-info" data files to have the same order structure so
In the future, when useSorted becomes advanced, we could have functions being at the bottom and regex patterns being a thing, but for now just this would be pretty simple to code.
Beta Was this translation helpful? Give feedback.
All reactions