Skip to content

fix(javascript): correctly handle parentheses between await and optional chaining#6087

Merged
alexander-akait merged 1 commit intomasterfrom
issue-5857
Apr 30, 2019
Merged

fix(javascript): correctly handle parentheses between await and optional chaining#6087
alexander-akait merged 1 commit intomasterfrom
issue-5857

Conversation

@alexander-akait
Copy link
Copy Markdown
Member

@alexander-akait alexander-akait commented Apr 26, 2019

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to the CHANGELOG.unreleased.md file following the template.
  • I’ve read the contributing guidelines.

Try the playground for this PR

fixes #5857

(list || list2)?.[list || list2];

async function HelloWorld() {
var x = await (foo.bar.blah)?.hi;
Copy link
Copy Markdown
Member Author

@alexander-akait alexander-akait Apr 26, 2019

Choose a reason for hiding this comment

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

Not right places :trollface: WIP

@alexander-akait alexander-akait changed the title fix(javascript): correctly handle comments in empty arrow function ex… fix(javascript): correctly handle comments in empty arrow function expressions Apr 26, 2019
@alexander-akait

This comment has been minimized.

@Sceat
Copy link
Copy Markdown

Sceat commented Apr 27, 2019

Can't wait for this 🤖 mergemergemergemerge

@alexander-akait
Copy link
Copy Markdown
Member Author

/cc @j-f1

Copy link
Copy Markdown
Member

@j-f1 j-f1 left a comment

Choose a reason for hiding this comment

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

LGTM — just make sure you change the PR title to reflect the contents of the PR before merging.

@alexander-akait alexander-akait changed the title fix(javascript): correctly handle comments in empty arrow function expressions fix(javascript): correctly handle parentheses between await and optional chaining Apr 29, 2019
@alexander-akait
Copy link
Copy Markdown
Member Author

Feel free to feedback

@alexander-akait alexander-akait merged commit 157b020 into master Apr 30, 2019
@alexander-akait alexander-akait deleted the issue-5857 branch April 30, 2019 11:25
@Sceat
Copy link
Copy Markdown

Sceat commented Apr 30, 2019

@evilebottnawi do u know about the process required to get it VsCode ? i guess it has to be published to npm and the extension updated by maintener ?

@alexander-akait
Copy link
Copy Markdown
Member Author

@Sceat I can't understand you

@Sceat
Copy link
Copy Markdown

Sceat commented May 2, 2019

@evilebottnawi just want to know the ETA for the prettier vscode extension with this fix

@j-f1
Copy link
Copy Markdown
Member

j-f1 commented May 4, 2019

We do releases approximately every 1.5 months, and I believe the VS Code extension uses whatever version you have installed, so once we release a new version, the VS Code extension will be updated.

@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Aug 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 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.

Await Stripping Parentheses w/ Optional Chaining

3 participants