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

Unstable formatting for logical operators #7544

Closed
mlrawlings opened this issue Feb 4, 2020 · 2 comments
Closed

Unstable formatting for logical operators #7544

mlrawlings opened this issue Feb 4, 2020 · 2 comments
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:duplicate Issues that are a duplicate of a previous issue

Comments

@mlrawlings
Copy link

mlrawlings commented Feb 4, 2020

Formatting for logical operator chains with parenthesis are not idempotent.

Prettier 1.19.1
Playground link

--parser babel

Input:

someLongVarThatWillBreak && (someLongVarThatWillBreak && someLongVarThatWillBreak);

First Output:

someLongVarThatWillBreak &&
  someLongVarThatWillBreak && someLongVarThatWillBreak;

Second Output:

someLongVarThatWillBreak &&
  someLongVarThatWillBreak &&
  someLongVarThatWillBreak;

Expected behavior:

Print the Second Output for the original Input.

@alexander-akait
Copy link
Member

@thorn0 We fix it in the next version, right?

@thorn0
Copy link
Member

thorn0 commented Feb 5, 2020

Right. Has has been fixed by #7026.

@thorn0 thorn0 closed this as completed Feb 5, 2020
@thorn0 thorn0 added the type:duplicate Issues that are a duplicate of a previous issue label Feb 22, 2020
@github-actions github-actions bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jun 27, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 27, 2020
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. type:duplicate Issues that are a duplicate of a previous issue
Projects
None yet
Development

No branches or pull requests

3 participants