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

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

Merged
merged 1 commit into from Apr 30, 2019

Conversation

alexander-akait
Copy link
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

@@ -61,5 +65,9 @@ a?.b?.c.d?.e;
(list || list2)?.length;
(list || list2)?.[list || list2];

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

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

Sceat commented Apr 27, 2019

Can't wait for this 🤖 mergemergemergemerge

@alexander-akait
Copy link
Member Author

/cc @j-f1

Copy link
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
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

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
Member Author

@Sceat I can't understand you

@Sceat
Copy link

Sceat commented May 2, 2019

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

@j-f1
Copy link
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