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
import/order
Fix group ranks order when alphabetizing
#2674
import/order
Fix group ranks order when alphabetizing
#2674
Conversation
A test case that fails without this fix is definitely necessary, otherwise we'll just break it again in the future :-) |
Unfortunately this test case passes on main :-/ do you have one that fails on main? |
Huh... Oh, it probably has to do with the number of path groups again... |
Ok, this should be working now. I tested it on |
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.
Looks great!
1a44ca9
to
0778b03
Compare
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) | devDependencies | patch | [`2.27.4` -> `2.27.5`](https://renovatebot.com/diffs/npm/eslint-plugin-import/2.27.4/2.27.5) | --- ### Release Notes <details> <summary>import-js/eslint-plugin-import</summary> ### [`v2.27.5`](https://github.com/import-js/eslint-plugin-import/blob/HEAD/CHANGELOG.md#​2275---2023-01-16) [Compare Source](import-js/eslint-plugin-import@v2.27.4...v2.27.5) ##### Fixed - \[`order]`: Fix group ranks order when alphabetizing (\[[#​2674](import-js/eslint-plugin-import#2674)], thanks \[[@​Pearce-Ropion](https://github.com/Pearce-Ropion)]) </details> --- ### Configuration📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMDIuNyIsInVwZGF0ZWRJblZlciI6IjM0LjEwNS4zIn0=--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1736 Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Resolves #2671
Correctly sorts
groupRanks
in numerical order when alphabetizing. This bug would occur for groups where therank
overflowed to double digits (eg."10"
is sorted before"4"
). This is a bug with the original code and not necessarily caused by #2506. There just previously wasn't a case where enough groups were added to get to the double digit ranks.The test case I made for this is similar to the example case shown in #2671 but it isn't the most general test case. It's just a case that would fail without this change.
I also went ahead and added a description comment to my previous PR's test case since it was missing one