Skip to content

feat: support experimentalOperatorPosition option#716

Closed
jtkiesel wants to merge 1 commit intomainfrom
feat/experimental-operator-position
Closed

feat: support experimentalOperatorPosition option#716
jtkiesel wants to merge 1 commit intomainfrom
feat/experimental-operator-position

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

@jtkiesel
Copy link
Contributor Author

Superseded by #731.

@jtkiesel jtkiesel closed this Jun 12, 2025
@jtkiesel jtkiesel deleted the feat/experimental-operator-position branch June 12, 2025 04:32
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