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

no-semi comments #1257

Merged
merged 1 commit into from
Apr 14, 2017
Merged

no-semi comments #1257

merged 1 commit into from
Apr 14, 2017

Conversation

vjeux
Copy link
Contributor

@vjeux vjeux commented Apr 13, 2017

Fixes #1245

vjeux added a commit to vjeux/prettier that referenced this pull request Apr 14, 2017
In prettier#1257, I discovered that if there's a `""` doc at the end, it's not going to trim the previous one correctly. It also happens to fix a few existing things.
@vjeux vjeux changed the title [WIP] no-semi comments no-semi comments Apr 14, 2017
@@ -1112,7 +1112,7 @@ switch (node && node.type) {
case "MethodDefinition":
prop = node.key;
break;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be fixed by #1259

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
let error = new Error(response.statusText)
// comment
;(error: any).response = response
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay!

vjeux added a commit that referenced this pull request Apr 14, 2017
In #1257, I discovered that if there's a `""` doc at the end, it's not going to trim the previous one correctly. It also happens to fix a few existing things.
It doesn't yet work but I think it's close
@vjeux vjeux merged commit 17051ec into prettier:master Apr 14, 2017
Copy link
Collaborator

@rattrayalex rattrayalex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Glad that worked. Will it also work for binary expressions, etc (eg, will the leadingComment always be attached to the Expressionstatement instead of child nodes) ?

@rattrayalex
Copy link
Collaborator

rattrayalex commented Apr 14, 2017 via email

@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 20, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants