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

feat(js): move binary operators to beginning of line #5108

Closed
wants to merge 1 commit into from

Conversation

btmills
Copy link
Contributor

@btmills btmills commented Sep 19, 2018

When binary expressions span multiple lines, this change moves the operator to the beginning of the second line instead of the end of the first. This fixes #3806.

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • I’ve read the contributing guidelines.

@ikatyang ikatyang requested review from azz and vjeux September 19, 2018 09:26
@vjeux
Copy link
Contributor

vjeux commented Sep 19, 2018

Hey, I’m sorry but this is a core decision that affects almost every printed line of code and at this point we will not change the existing behavior. This would be a huge breaking change and be way too controversial to everyone using prettier today.

@btmills
Copy link
Contributor Author

btmills commented Sep 19, 2018

No worries! The original issue was locked, so I couldn’t ask if there was still any interest there, but it was easy enough just to submit a PR. Is there any interest in doing this behind an option instead? I would be happy to at least try adding that to this PR.

@kachkaev
Copy link
Member

Something to consider for v2?

@suchipi
Copy link
Member

suchipi commented Sep 20, 2018

I think at this point it would be more appropriate for this to be in a fork rather than v2 or behind an option, I don't want to invite the onslaught of opinions

@suchipi suchipi closed this Sep 20, 2018
@lipis lipis added this to the 1.15 milestone Oct 26, 2018
@ikatyang ikatyang removed this from the 1.15 milestone Nov 29, 2018
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Feb 27, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 27, 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.

Placing operators at the beginning of lines
6 participants