fix: sort-keys autofix fully sorts keys in a single pass#235
fix: sort-keys autofix fully sorts keys in a single pass#235crimsonjay0 wants to merge 2 commits into
Conversation
|
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
|
Not stale. I just forgot this was a draft. |
|
This PR has too many unnecessary unrelated changes to making the fix sort in a single pass.
|
Prerequisites checklist
AI acknowledgment
What is the purpose of this pull request?
The
sort-keysautofix previously used a pairwise swap strategy, where each--fixpass only swapped two adjacent out-of-order members. For a fully reversed object with N keys, this required up to N-1 passes ofeslint --fixto reach a fully sorted state.What changes did you make? (Give an overview)
I replaced the pairwise swap fixer with a segment-based sorting approach that fully sorts all keys in a single pass.
Related Issues
Fixes #222
Is there anything you'd like reviewers to focus on?