-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Ensure non-top most conditional expr is indented.
- Loading branch information
Showing
2 changed files
with
43 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
~~ deno: true ~~ | ||
== should format as-is. This could probably be better and note that the entire assignment is the conditional expression == | ||
const es5Bundle = test === asdf ? true : false || | ||
target === ts.ScriptTarget.ES2016 | ||
? true | ||
: false | ||
|
||
[expect] | ||
const es5Bundle = test === asdf ? true : false || | ||
target === ts.ScriptTarget.ES2016 | ||
? true | ||
: false; | ||
|
||
== should format as-is == | ||
const es5Bundle = target === ts.ScriptTarget.ES3 || | ||
target === ts.ScriptTarget.ES5 || | ||
target === ts.ScriptTarget.ES2015 || | ||
target === ts.ScriptTarget.ES2016 | ||
? true | ||
: false; | ||
|
||
[expect] | ||
const es5Bundle = target === ts.ScriptTarget.ES3 || | ||
target === ts.ScriptTarget.ES5 || | ||
target === ts.ScriptTarget.ES2015 || | ||
target === ts.ScriptTarget.ES2016 | ||
? true | ||
: false; |