-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR Feedback: only-same-line-comments should be treated as trailing
Fixes: - trailing attachments should be used much more rarely / leading comment on code shouldn't treated as trailing comment on an import - various unexpected newline injections - unnecessary test3, is duplicate of test2 - some test cases now behave correctly, but had comments added implying things about gaps being unexpectedly deleted (when they're definitely present)
- Loading branch information
Showing
14 changed files
with
50 additions
and
86 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
tests/ImportCommentsPreserved/import-comments-document-top-test2.ts
This file contains 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
7 changes: 0 additions & 7 deletions
7
tests/ImportCommentsPreserved/import-comments-document-top-test3.ts
This file was deleted.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
tests/ImportCommentsPreserved/import-comments-outer-comments-block-comments.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
// Loose leading comment before imports (should not be dragged down with B) | ||
|
||
/* Leading comment before B */ | ||
import B from "b"; /* Trailing comment on same-line as B (babel doesn't like CommentBlocks on same-line as anything else, so it will be shifted to a clean line) */ | ||
/* Trailing comment on first line after B (This is treated as a leading comment for next import A!) */ | ||
import B from "b"; /* Trailing comment on same-line as B */ | ||
/* Trailing comment on first line after B (this is treated as a leading comment for next import A!) */ | ||
|
||
|
||
/* Leading comment before A */ | ||
import A from "a"; /* Trailing comment on same-line as A (babel doesn't like CommentBlocks on same-line as anything else, so it will be shifted to a clean line) */ | ||
/* Trailing comment on first line after A (will initially, because this is "close" to last-import 'a' */ | ||
import A from "a"; /* Trailing comment on same-line as A */ | ||
/* Trailing comment on first line after A (this is treated as a "bottom-of-imports comment) */ | ||
|
||
// Loose trailing comment after imports (should not be dragged up with A) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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