Skip to content
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

Failing tests for comments on runtime code within imports #89

Draft
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

IanVS
Copy link
Owner

@IanVS IanVS commented May 17, 2023

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.

@zim89
Copy link

zim89 commented Dec 7, 2023

не совсем понял о чем собственно речь. а можно немного более подробней описать суть проблемы?

@IanVS
Copy link
Owner Author

IanVS commented Dec 7, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants