Skip to content

Failing tests for comments on runtime code within imports#89

Draft
IanVS wants to merge 1 commit intonextfrom
failing/comments-on-runtime
Draft

Failing tests for comments on runtime code within imports#89
IanVS wants to merge 1 commit intonextfrom
failing/comments-on-runtime

Conversation

@IanVS
Copy link
Copy Markdown
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
Copy Markdown

zim89 commented Dec 7, 2023

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

@IanVS
Copy link
Copy Markdown
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.

2 participants