useSortedKeys: Support custom key sorting based on filename configuration
#6122
lazuee
started this conversation in
Rule suggestion
Replies: 3 comments 3 replies
-
|
Yeah sounds like a reasonable request! ➕1️⃣ |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
I created a PR #6506 for that feature, you can use the |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
I agree. The natural ordering for |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
The current
useSortedKeyssorts object keys in natural order, which works fine in general. But for files likepackage.jsonandtsconfig.json, this can make things look a bit messy and harder to read, since the key order doesn't follow the usual conventions.It would be great to have a way to customize the sort order based on the filename, so we can keep things neat, especially in files where the order really matters for readability.
ref: https://github.com/ntnyq/eslint-config/blob/615d147c8e6aa3a7095f8e1ef9a19d0ecc865686/src/configs/sort.ts
Beta Was this translation helpful? Give feedback.
All reactions