Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prettierx: test formatting of nested ternary promise expressions
check for consistent formatting on prettierx side as discussed in: - eslint/eslint#13971 - standard/standard#1624 - #41
- Loading branch information
Showing
3 changed files
with
358 additions
and
0 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
14 changes: 14 additions & 0 deletions
14
tests/ternary-object-expressions/nested-ternary-promises.js
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,14 @@ | ||
// check for consistent formatting as discussed in: | ||
// - https://github.com/eslint/eslint/issues/13971 | ||
// - https://github.com/standard/standard/issues/1624 | ||
// - https://github.com/brodybits/prettierx/issues/41 | ||
|
||
function test1() { | ||
return condition1 | ||
? condition2 | ||
? Promise(1) | ||
: Promise(2) | ||
: condition3 | ||
? Promise(3) | ||
: Promise(4) | ||
} |
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