Skip to content

🛠 Tooling: Use an ESLint object literal keys sort rule #396

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

Closed
3 tasks done
JoshuaKGoldberg opened this issue May 3, 2023 · 5 comments · Fixed by #527
Closed
3 tasks done

🛠 Tooling: Use an ESLint object literal keys sort rule #396

JoshuaKGoldberg opened this issue May 3, 2023 · 5 comments · Fixed by #527
Assignees
Labels
area: tooling Managing the repository's maintenance status: blocked Waiting for something else to be resolved type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

I prefer sorting things 😄 and now you're all going to suffer with me!

const value = {
-	def, abc,
+	abc, def,
};

But, I think it's only reasonable to sort object literal keys when:

  • The rule will autofix them for you
  • The rule doesn't change any logic

Additional Info

I'll take this on to make sure we get a good one.

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this! labels May 3, 2023
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this May 3, 2023
@JoshuaKGoldberg
Copy link
Owner Author

Welp those are all either locked or out of date. Never mind!

@JoshuaKGoldberg JoshuaKGoldberg added status: blocked Waiting for something else to be resolved and removed status: accepting prs Please, send a pull request to resolve this! labels May 11, 2023
@JoshuaKGoldberg
Copy link
Owner Author

@JoshuaKGoldberg
Copy link
Owner Author

Blocked on azat-io/eslint-plugin-perfectionist#12. Otherwise looks very good!

JoshuaKGoldberg added a commit that referenced this issue Jun 12, 2023
## PR Checklist

- [x] Addresses an existing open issue: fixes #396
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

I am a perfectionist. It's a match made in heaven!

Swaps from the much more targeted `eslint-plugin-simple-import-sort` and
`eslint-plugin-typescript-sort-keys` to `eslint-plugin-perfectionist`.
@github-actions
Copy link

🎉 This is included in version v1.28.13 🎉

The release is available on:

Cheers! 📦🚀

1 similar comment
@github-actions
Copy link

🎉 This is included in version v1.28.13 🎉

The release is available on:

Cheers! 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: tooling Managing the repository's maintenance status: blocked Waiting for something else to be resolved type: feature New enhancement or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant