Skip to content

Commit

Permalink
Add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Dec 29, 2022
1 parent 06d2b99 commit db1c844
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions changelog_unreleased/javascript/14077.md
@@ -0,0 +1,19 @@
#### Add parentheses to head of `ExpressionStatement` instead of the whole statement (#14047 by @fisker)

<!-- prettier-ignore -->
```jsx
// Input
({}).toString.call(foo) === "[object Array]"
? foo.forEach(iterateArray)
: iterateObject(foo);

// Prettier stable
({}.toString.call(foo) === "[object Array]"
? foo.forEach(iterateArray)
: iterateObject(foo));

// Prettier main
({}).toString.call(foo.forEach) === "[object Array]"
? foo.forEach(iterateArray)
: iterateObject(foo);
```

0 comments on commit db1c844

Please sign in to comment.