Skip to content
This repository was archived by the owner on May 19, 2018. It is now read-only.

Conversation

@danez
Copy link
Member

@danez danez commented Apr 23, 2016

This fixes an issue that comments were added as leading comments
to expressions, which are not immediately following the comment.

if (a) {
  // comment
}

return a;

This example adds //comment as leading comment to return a;

This was also reported and fixed in espree, and is basically a port to
babylon. eslint/js#256

this also fixes an issue in babel-eslint with certain rules babel/babel-eslint#289

The only thing is that comments within jsx `{/* comment */} are now not added as leading comment anymore to the closingElement. I'm not really sure if thats wrong, as it is still added as innerComment.

This fixes an issue that comments were added as leading comments
to expressions, which are not immediately folowing the comment.
This was also reported and fixed in espree, and is basically a port to
babylon. eslint/js#256

this also fixes an issue in babel-eslint with certain rules babel/babel-eslint#289
@kaicataldo
Copy link
Member

I wrote the fixes for Espree and was planning on porting it over - looks like you beat me to it!

@ghost
Copy link

ghost commented May 5, 2016

Please accept this PR, as I am running into the issue mentioned in eslint/eslint issue #6090

@ghost
Copy link

ghost commented May 10, 2016

Bump. Is there anyone available that can merge this PR?

@sebmck sebmck merged commit 7859729 into babel:master Jun 22, 2016
@danez danez deleted the fix-comments branch June 22, 2016 11:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants