Skip to content

Merge computed MemberExpression in member chain - #2670

Merged
vjeux merged 1 commit into
prettier:masterfrom
azz:computed-member-expr
Aug 26, 2017
Merged

vjeux merged 1 commit into
prettier:masterfrom
azz:computed-member-expr

Conversation

@azz

@azz azz commented Aug 26, 2017 •

Copy link
Copy Markdown
Member
// Before
data
  [key]('foo')
  .then(() => console.log('bar'))
  .catch(() => console.log('baz'));

// After
data[key]('foo')
  .then(() => console.log('bar'))
  .catch(() => console.log('baz'));

Fixes #1313


I'm not 100% sure if it's worth adding a special case for computeds here though? This issue is the second-highest upvoted bug though.

@vjeux
vjeux merged commit dd84559 into prettier:master Aug 26, 2017
@vjeux

vjeux commented Aug 26, 2017

Copy link
Copy Markdown
Contributor

It doesn't hurt :)

@azz
azz deleted the computed-member-expr branch August 26, 2017 13:32
@azz azz mentioned this pull request Aug 27, 2017
4 of 6 tasks
@lock lock Bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 19, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 19, 2019
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