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

Add missing explanatory comment in ForStatement case #748

Conversation

yamafaktory
Copy link
Contributor

@jlongster here comes the PR for the missing comment, as requested in #742 (comment).

@@ -989,6 +989,7 @@ function genericPrintNoParens(path, options, print) {
case "ForStatement": {
const body = adjustClause(path.call(print, "body"), options);

// We want to keep dangling comments above the loop to stay consistent.
Copy link
Member

Choose a reason for hiding this comment

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

I think explaining what comment is dangling is helpful (I'm not even sure why this comment was classified as dangling). Can you say something about the comment being between the for statement and the parentheses?

@yamafaktory
Copy link
Contributor Author

@jlongster does it meet your expectations now?

@jlongster
Copy link
Member

Perfect, thanks!

@jlongster jlongster merged commit de8873a into prettier:master Feb 20, 2017
@yamafaktory yamafaktory deleted the 697-fix-missing-dangling-comments-for-loop-add-comment branch February 25, 2017 18:30
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 21, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 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