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

Unidempotency with comment + return + , expression #2392

Open
bakkot opened this issue Jul 4, 2017 · 0 comments
Open

Unidempotency with comment + return + , expression #2392

bakkot opened this issue Jul 4, 2017 · 0 comments
Labels
area:comments Issues with how Prettier prints comments area:idempotency Issues with re-printing Prettier’s output lang:javascript Issues affecting JS type:bug Issues identifying ugly output, or a defect in the program

Comments

@bakkot
Copy link
Collaborator

bakkot commented Jul 4, 2017

After #2388 (which hasn't landed as of this writing), there's a commented out test in tests/comments/return-statement.js, reading

Playground

function sequenceExpression() {
  return (
    // Reason for a
    a
  ), b
}

It is commented out because the first time it's formatted it becomes

function sequenceExpression() {
  return (
    // Reason for a
    a,
    b
  );
}

and formatting that gives

function sequenceExpression() {
  return (
    // Reason for a
    a, b
  );
}

We decided this was rare enough not to be worth blocking the PR, but it would be nice to resolve.

@bakkot bakkot added type:bug Issues identifying ugly output, or a defect in the program area:comments Issues with how Prettier prints comments labels Jul 4, 2017
@azz azz added the lang:javascript Issues affecting JS label Oct 4, 2017
@thorn0 thorn0 added the area:idempotency Issues with re-printing Prettier’s output label May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:comments Issues with how Prettier prints comments area:idempotency Issues with re-printing Prettier’s output lang:javascript Issues affecting JS type:bug Issues identifying ugly output, or a defect in the program
Projects
None yet
Development

No branches or pull requests

3 participants