Files
test-repo/changelog_unreleased/javascript/pr-7010.md
T
fisker Cheung da8d082ce0 Add changelog lint script (#7320)
* Add changelog lint script

* Refactor lint script

* spell

* Fix indent

* fix templateComment

* add H4 check

* Add category in title check

* use array destructuring

* Add space check
2020-01-15 19:25:55 +02:00

1.1 KiB

Fix formatting of logical, binary and sequence expressions in template literals (#7010 by @evilebottnawi)

// Input
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${foo || bar}`;
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${foo | bar}`;
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${(foo, bar)}`;

// Prettier stable
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${foo ||
  bar}`;
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${foo |
  bar}`;
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${(foo,
bar)}`;

// Prettier master
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${
  foo || bar
}`;
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${
  foo | bar
}`;
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${
  (foo, bar)
}`;