Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[New]order: addorderByFullPathString option#3196

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
tw3 wants to merge4 commits intoimport-js:main
base:main
Choose a base branch
Loading
fromtw3:issue2722

Conversation

@tw3
Copy link

@tw3tw3 commentedJun 27, 2025

No description provided.

@codecov
Copy link

codecovbot commentedJun 27, 2025

Codecov Report

Attention: Patch coverage is0% with5 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base(01c9eb0) to head(5700f01).

Files with missing linesPatch %Lines
src/rules/order.js0.00%5 Missing⚠️

❗ There is a different number of reports uploaded between BASE (01c9eb0) and HEAD (5700f01). Click for more details.

HEAD has 18 uploads less than BASE
FlagBASE (01c9eb0)HEAD (5700f01)
246
Additional details and impacted files
@@            Coverage Diff             @@##             main   #3196       +/-   ##==========================================- Coverage   82.25%   0.00%   -82.26%==========================================  Files          94      94                 Lines        4283    4262       -21       Branches     1478    1427       -51     ==========================================- Hits         3523       0     -3523- Misses        760    4262     +3502

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@ljharbljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks like there's some uncovered lines, so we'll need some more test cases.

@ljharbljharb changed the titlefeat(order): add orderBySplitPaths option[New]order: addorderByFullPathString optionJul 1, 2025

-**`caseInsensitive`**: use`true` to ignore case and`false` to consider case when sorting

-**`orderByFullPathString`**: use`false` to split by paths and sort by each one and`true` to sort by the full un-split path string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

is there a better way to phrase this?

like, perhaps one way sorts the way certain operating systems and IDEs do, and the other sorts the way other ones do? (with an example list of each)

tw3 reacted with thumbs up emoji
-**`caseInsensitive`**: use`true` to ignore case and`false` to consider case when sorting

-**`orderByFullPathString`**: use`true` to sort by the full un-split path string and`false` to split by paths and sort by each one
- enabling this flag may better align with the sort algorithm used by certain operating systems and IDE's, e.g. the Organize Imports action in JetBrains IDE's
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

sorry to ask for more work, but i'd love some research on lists forboth of the options :-)

Copy link
Author

@tw3tw3Jul 1, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

personally I'm only aware of the impact to Organize Imports in WebStorm b/c that is what has affected me and my team

not sure how i would find other impacted examples

i know that other people have taken note of this difference:#2722

apparently this has had an effect on Microsoft'saccessibility-insights-web tool

microsoft/accessibility-insights-web#6846

should i add that to the markup?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

That'd be great!

How does your local OS sort these things?

Copy link
Author

@tw3tw3Jul 1, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Here's a video demo of the Organize Imports behavior in WebStorm IDE:

org-imports-demo-video.mp4

Ideally Jetbrains would make the sort algorithm for Organize Imports configurable from their end, but unfortunately that isn't currently possible.

So without a change in this plugin my team will either need to:

  • Stay on version 2.26 of this plugin, or
  • Always sort according to Eslint and no longer use the action in WebStorm, or
  • Choose a different/simpler import plugin that "vibes" with WebStorm

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Sure, that makes sense :-)

I meant, in Mac and Windows, say, if you name a bunch of empty files as the specifier names, how does it sort them?

Copy link
Author

@tw3tw3Jul 1, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is what I see on Windows

image

This does indeed list files according to the new split-by-path-then-order algorithm

Or were you looking for something different?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nope, that's perfect! I believe Mac works the same way.

robmisasi pushed a commit to robmisasi/eslint-plugin-import that referenced this pull requestNov 11, 2025
robmisasi added a commit to robmisasi/eslint-plugin-import that referenced this pull requestNov 11, 2025
robmisasi added a commit to robmisasi/eslint-plugin-import that referenced this pull requestNov 11, 2025
robmisasi added a commit to robmisasi/eslint-plugin-import that referenced this pull requestNov 11, 2025
@robmisasi
Copy link

Hello@ljharb and@tw3! It looks like this PR hasn't been worked on for some time and I wanted to address the outstanding issues. I forked the repository and copied the changes from this PR into a branchhere.

It looks like there was a problem in the added unit tests where the neworderByFullPathString was incorrectly specified preventing the new tests from running. The latest commit on the linked branch has changes movingorderByFullPathString into the test'salphabetize options in alignment with theimport/order spec.

ljharb reacted with eyes emoji

@ljharb
Copy link
Member

Thanks! I'll take a look and pull in the changes.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ljharbljharbljharb requested changes

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@tw3@robmisasi@ljharb

[8]ページ先頭

©2009-2025 Movatter.jp