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: support experimentalOperatorPosition option #716

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jtkiesel
Copy link
Contributor

What changed with this PR:

Prettier 3.5's experimentalOperatorPosition option is now supported.

Comments are causing issues currently, will need to investigate further. I've been meaning to look into improving the way comments are handled in general, but haven't gotten around to it.

Example

Options

--experimental-operator-position start

Input

class Example {

  void example() {
    var rotateX = RANGE / rect.height * refY - RANGE / 2 * getXMultiplication(rect.width);
  }
}

Output

class Example {

  void example() {
    var rotateX =
      (RANGE / rect.height) * refY
      - (RANGE / 2) * getXMultiplication(rect.width);
  }
}

Relative issues or prs:

Closes #534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrap before binary operators
1 participant