refactor(organizeImports): improve diagnostics#9574
Draft
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Conaclos
commented
Mar 21, 2026
|
|
||
| # Diagnostics | ||
| ``` | ||
| custom-order-exports.ts:1:1 assist/source/organizeImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ |
Member
Author
There was a problem hiding this comment.
This seems to be a regression.
Conaclos
commented
Mar 21, 2026
| newline_issue: NewLineIssue, | ||
| }, | ||
| /// Unsorted chunk of imports or exports | ||
| UnsortedChunk { |
Member
Author
There was a problem hiding this comment.
I renamed it for clarity. I think that I used the term prefix because the first implementation stopped at the first import/export that was unsorted. The current implementation reports entire chunks. Thus, it doesn't make sense of talking about chunk prefixes.
This comment was marked as outdated.
This comment was marked as outdated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Attempt to fix #9530 (comment)
This PR adds detailed diagnostics for the issues reported by the
organizeImports.This is a draft. Feedbacks are expected :)
I personally find it a bit too verbose. Any opinion?
Note I didn't change
Rule::text_rangeto keep the current behavior for biome-ignore comments: they have to be placed on the first import or export that appears in thew file.Test Plan
I updated the snapshot.
Docs
Nochange.