Failing tests for comments on runtime code within imports#89
Draft
Failing tests for comments on runtime code within imports#89
Conversation
|
не совсем понял о чем собственно речь. а можно немного более подробней описать суть проблемы? |
Owner
Author
|
@zim89 the test attempts to demonstrate it: https://github.com/IanVS/prettier-plugin-sort-imports/pull/89/files#diff-571840db8845eb31e2c09ff57b971d3c56bd7f8297e5255ffca432211eeb205dR3-R4 This is only a problem when there are comments on runtime code that comes before or between import statements. Normally import statements are always at the top of a file, so this is not an issue that many (any?) users hit. The tests fail, because the comments are not kept with the lines that they are documenting. |
zim89
approved these changes
Dec 7, 2023
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.
We have trouble moving comments on runtime code within the imports, because we treat those as comments on the imports instead.
This is just a couple of failing tests, in case we have time to come back and work on this.