forked from dprint/dprint-plugin-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jsx: add spaceBeforeSelfClosingTag config (dprint#3)
- Loading branch information
1 parent
5ce0ac6
commit 4a84bac
Showing
5 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
tests/specs/jsx/JsxElement/JsxElement_SpaceBeforeSelfClosingTag_False.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-- filePath: file.tsx -- | ||
~~ jsxElement.spaceBeforeSelfClosingTag: false ~~ | ||
== should avoid space before self closing tag when there are no attributes == | ||
const t = <Test />; | ||
|
||
[expect] | ||
const t = <Test/>; | ||
|
||
== should avoid space before self closing tag when there are attributes = | ||
const t = <Test first="foo" second="bar" />; | ||
|
||
[expect] | ||
const t = <Test first="foo" second="bar"/>; |