-
-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(js_formatter): fix some random indention inconsistencies #1162
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -530,6 +530,7 @@ impl AnyJsBinaryLikeExpression { | |
| JsSyntaxKind::JS_THROW_STATEMENT | ||
| JsSyntaxKind::JS_CALL_EXPRESSION | ||
| JsSyntaxKind::JS_IMPORT_CALL_EXPRESSION | ||
| JsSyntaxKind::JS_CALL_ARGUMENT_LIST | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When a binary expression is part of the call arguments, its grand parent is Adding this here means that binaries are formatted consistently whether they're the receiver or an argument to a call expression: foo(
someCondition === true ||
anotherCondition === false
); should actually indent the right hand side, but wasn't because the grandparent is foo(
someCondition === true ||
anotherCondition === false
); |
||
| JsSyntaxKind::META | ||
) | ||
}) | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole diff is a little bit weird, but this just moves the leading comment inside of the signature formatting, ensuring that it picks up the potential indention that's applied below (line +590).
It fixes this:
which should actually be formatted to
where the leading comment lines up with the following parens.