JavaScript: Prefer a trailing comment when there is comment between test and consequent on ternary#6418
Closed
sosukesuzuki wants to merge 12 commits intoprettier:masterfrom
Closed
JavaScript: Prefer a trailing comment when there is comment between test and consequent on ternary#6418sosukesuzuki wants to merge 12 commits intoprettier:masterfrom
sosukesuzuki wants to merge 12 commits intoprettier:masterfrom
Conversation
alexander-akait
requested changes
Sep 26, 2019
Member
alexander-akait
left a comment
There was a problem hiding this comment.
Good job, let's add more tests
| comment | ||
| comment */ | ||
| foo | ||
| : bar; |
Member
There was a problem hiding this comment.
Let's add more test:
- comments after
: - nested ternary with same examples
Member
|
What’s the status of this PR? |
Contributor
Author
|
@j-f1 Sorry, I forgot this. I'll do this in this weekend. |
Member
thorn0
requested changes
Jun 5, 2020
|
|
||
| const isLastComment = comments.length - 1 === i; | ||
|
|
||
| const isEnclosedByTernary = |
Member
There was a problem hiding this comment.
This is not the right file for JS-specific things. This should be handled in language-js/comments.js.
Contributor
Author
|
ooops sorry I forgot. I'll work on this at today or tomorrow. |
Contributor
Author
|
It is hard to merge |
Open
3 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fix #2076
docs/directory)CHANGELOG.unreleased.mdfile following the template.✨Try the playground for this PR✨