This website requires JavaScript.
Explore
Help
Sign In
vitalif-js
/
prettier
Watch
1
Star
0
Fork
You've already forked prettier
0
Code
Issues
Pull Requests
Projects
Releases
Wiki
Activity
c794de0e9f
prettier
/
tests
/
comments_jsx_same_line
/
jsx_same_line.js
29 lines
232 B
JavaScript
Raw
Normal View
History
Unescape
Escape
Don't print JSX bracket on same line when it has trailing comments (#3088)
2017-10-23 09:13:12 +03:00
<
div
// comment
>
{
foo
}
<
/
d
i
v
>
;
fix(jsx): Break opening elements with single text attribute if there's a comment (#3154) * fix(jsx): Break opening elements with single text attribute if there's a comment * Single text attribute with a comment on the JSXElement name * Consolidate rules of comments in JSX
2017-11-07 00:05:59 +03:00
<
div
// comment
attr
=
"foo"
>
{
foo
}
<
/
d
i
v
>
;
<
div
attr
=
"foo"
// comment
>
{
foo
}
<
/
d
i
v
>
;
<
div
attr
=
"foo"
// comment
>
{
foo
}
<
/
d
i
v
>
;
Don't break self closing elements with no attributes (#3250)
2017-11-13 07:20:17 +03:00
<
br
// comment
/
>
;