Skip to content
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

Break closing paren of ConditionalExpression in member chains #2786

Merged
merged 4 commits into from
Sep 10, 2017

Conversation

duailibe
Copy link
Member

Still related to #2775, maybe a better way to print this case.

(a
  ? b
  : c
).prop;

(a
  ? b
  : c
).call();

(a
  ? b
  : c
)
  .call1()
  .call2();

If you guys think this is cool, let me know if I should do the same for LogicalExpression (I believe so) and we can do it in a single commit

Thanks!

Copy link
Member

@suchipi suchipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks as always, you're rocking it this week 😃

What would it look like for logical expressions?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(valid
? helper.responseBody(this.currentUser)
: helper.responseBody(this.defaultUser)).prop;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand why it's happening, but this kinda feels like a regression on the changes in #2784. I think I'm okay with it, though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, that's my mistake I forgot to update this test 😳

@duailibe
Copy link
Member Author

@suchipi I forgot to update a snapshot 😅

I updated it with what I think would work for logical expressions

Copy link
Member

@suchipi suchipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 👍

@suchipi
Copy link
Member

suchipi commented Sep 10, 2017

Looks like CI is failing due to a format violation; could you fix?

@duailibe
Copy link
Member Author

Oops so sorry about that.

Fixed!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants