Files
test-repo/changelog_unreleased/javascript/pr-8461.md
T
Sosuke Suzuki 6b4c4066aa JSX: Wrap jsx element on the left of "<" with parentheses (#8461)
* Modify to wrap jsx on the left of "<"

* Only left

* Add changelog
2020-06-01 10:27:55 +09:00

487 B

Wrap jsx element on the left of "<" with parentheses (#8461 by @sosukesuzuki)

// Input
(<div/>) < 5;

// Prettier stable
<div/> < 5;

// Prettier stable second outout
SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (1:9)
> 1 | <div /> < 5;
    |         ^
  2 | 

// Prettier master
(<div />) < 5;