-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Repo: Enable alphabetical (natural) sorting of fields #8479
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
Comments
Edit: no longer ✅ |
@JoshuaKGoldberg Here is some info that I discovered while working on #8726, that you might find helpful when you begin working on this!
|
Marking as blocked on the v8 launch because the |
@JoshuaKGoldberg, just curious — what did you end up doing with |
I figured we could add that in after the PRs are merged. We won't know the full list of commit hashes until then. 🤷 |
Note from #9842 (comment): we'd like to customize the Edit: #9846 (comment), too. |
Notes, too, on bugs or feature requests to file:
|
Suggestion @JoshuaKGoldberg - lets disable sorting on enums. enum BagOfValues {
Foo = 1,
Bar = 2,
Baz = 3,
Bang = 4,
} Is much better than enum BagOfValues {
Bang = 4,
Bar = 2,
Baz = 3,
Foo = 1,
} Or for a real example: typescript-eslint/packages/type-utils/src/isTypeReadonly.ts Lines 13 to 20 in 90cebbb
Is much better than typescript-eslint/packages/type-utils/src/isTypeReadonly.ts Lines 15 to 22 in e04faa5
|
Suggestion
Spinning out of #8477 (comment): we're interested in maybe enabling https://eslint-plugin-perfectionist.azat.io/configs/recommended-natural or similar to enforce alphabetical sorting of fields. That likely includes methods and properties on classes, interfaces, objects, type aliases, and so on.
For reference I've used that rule in my http://github.com/JoshuaKGoldberg/create-typescript-app for quite a while now and have been very happy with it.
The text was updated successfully, but these errors were encountered: