-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What rule do you want to change?
sort-imports (but can be applied to other rules that handle group as well)
Describe the problem
sort-imports's grouping behavior can be a bit confusing in some cases (see the latest issue #470), and it's not easy for users to see if an import actually belongs to the group they think they should.
Two imports from the same group that are misplaced will return the following error:
Expected "NEXT IMPORT" to come before "PREVIOUS IMPORT".
I suggest that we improve this error message to show the group both imports belong to:
Expected "NEXT_IMPORT" to come before "PREVIOUS_IMPORT" (both in group "COMMON_GROUP").
Additional details
- When
groupsis[]or [unknown], the common group will always beunknown, so we should keep a simple error message in that case.
Validations
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
sgringwe and lishaduck
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request