-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterThe issue relates to the built-in formatterDomain: Smart IndentationAutomatic indenting after a newline (not quite formatter/formatting)Automatic indenting after a newline (not quite formatter/formatting)Good First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this
Milestone
Description
Actual:
var v =
0 ? 1 :
2 ? 3 :
4;
Expected:
var v =
0 ? 1 :
2 ? 3 :
4;
I believe the fix is that if the false branch of the ternary operator should have the same indentation as the true branch. In the case where the true branch is on the same line as the condition, it should not be considered indented, and therefore the false branch should not be indented.
olmobrutall, aluanhaddad, Meowtimer, dbettini, bmsdave and 13 more
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterThe issue relates to the built-in formatterDomain: Smart IndentationAutomatic indenting after a newline (not quite formatter/formatting)Automatic indenting after a newline (not quite formatter/formatting)Good First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this