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

Comment placement not preserved in function name(/* comment */) #483

Closed
dashed opened this issue Jan 13, 2015 · 4 comments
Closed

Comment placement not preserved in function name(/* comment */) #483

dashed opened this issue Jan 13, 2015 · 4 comments
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@dashed
Copy link
Contributor

dashed commented Jan 13, 2015

Comment placement not preserved in the following:

source

// no args
function foo(/* some comment */) {
}

6to5 v2.12.0

"use strict";

function foo() {}
/* some comment */

This works though:

// have args
function foo( arg /* some comment */) {
}
function foo( /* some comment */ arg) {
}
@sebmck
Copy link
Contributor

sebmck commented Jan 13, 2015

Duplicate of #407

@sebmck sebmck closed this as completed Jan 13, 2015
@dashed
Copy link
Contributor Author

dashed commented Jan 13, 2015

Hmm that's unfortunate.

@jamiebuilds
Copy link
Contributor

@dashed Why exactly are you placing comments inside your function params? These issues keep coming up and I can't tell why people are doing it...

@dashed
Copy link
Contributor Author

dashed commented Jan 15, 2015

@thejameskyle I'm guessing brief annotations.

I don't do it at the function definition, but when I'm using it, I use comments as brief annotations:

customReactcomponent({}, /* alwaysRender */ true);

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jan 18, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

3 participants