Files
test-repo/changelog_unreleased/javascript/10158.md
T
Sosuke Suzukiandfisker Cheung c881350e8c Break assignment whose rhs is wrapped by an unary expression (#10158)
* Break assignment whose rhs is wrapped unary expression

* Add changelog

* Recursive

* Refactor

* With loop

* Use if

* Update assignment.js

* Update assignment.js

This rewrite not totally equal, but should safe.

* Revert "Update assignment.js"

This reverts commit 14549442b7726461b0e39d0b1077cdbb00195e73.

* Try move parser check upper

* Simplify `switch`

* Simplify

* Move parser check to top

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-01-28 23:06:16 +09:00

444 B

Break assignment whose rhs is wrapped by an unary expression (#10158 by @sosukesuzuki)

// Input
const loooooooooooooooooooooooooong = !looooooooooooooong.looooooooooooooong.loooooong;

// Prettier stable
const loooooooooooooooooooooooooong = !looooooooooooooong.looooooooooooooong
  .loooooong;

// Prettier main
const loooooooooooooooooooooooooong =
  !looooooooooooooong.looooooooooooooong.loooooong;