-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: sort-order rule shouldn't change sub-keys, better auto-fix #312
Conversation
@JoshuaKGoldberg Sorry for the direct ping, I don't want you to miss this one. Please feel free to review it when you have time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks! Just the one testing request. 🚀
Also - I think this is a big enough change (new dependencies, better auto-fix) that even though it's technically a bugfix, I'd like it to give it as a minor release rather than a patch. Renaming to feat: ...
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Testing] Could you add a valid
case where the top-level keys are sorted but sub-keys aren't? That way we know the logic is still just looking at the top-level keys.
return fixer.replaceText( | ||
context.sourceCode.ast, | ||
JSON.stringify(orderedSource, null, 2) + | ||
`\n`, | ||
result, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Praise] Nice, this results in better-preserved formatting for all auto-fixes!
Thanks for the ping! I've been in and out of being swamped with ESLint v9 / typescript-eslint v8 work, just emerging from that cocoon now. 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 This is included in version v0.13.0 🎉 The release is available on: Cheers! 📦🚀 |
PR Checklist
status: accepting prs
Overview