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

@evilebottnawi
Copy link
Member

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;

This comment has been minimized.

Copy link
@evilebottnawi

evilebottnawi Apr 26, 2019

Author Member

Not right places :trollface: WIP

@evilebottnawi evilebottnawi force-pushed the issue-5857 branch from 19e9e64 to 9c663c6 Apr 26, 2019

@evilebottnawi evilebottnawi 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

@evilebottnawi

This comment was marked as off-topic.

Copy link
Member Author

commented Apr 26, 2019

@berrylaw What do you mean?

@Sceat

This comment has been minimized.

Copy link

commented Apr 27, 2019

Can't wait for this 🤖 mergemergemergemerge

@evilebottnawi

This comment has been minimized.

Copy link
Member Author

commented Apr 29, 2019

/cc @j-f1

@j-f1
j-f1 approved these changes Apr 29, 2019
Copy link
Member

left a comment

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

@evilebottnawi evilebottnawi 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

@evilebottnawi

This comment has been minimized.

Copy link
Member Author

commented Apr 30, 2019

Feel free to feedback

@evilebottnawi evilebottnawi merged commit 157b020 into master Apr 30, 2019

16 of 18 checks passed

Header rules No header rules processed
Details
Pages changed 1 new file uploaded
Details
Mixed content No mixed content detected
Details
Redirect rules 4 redirect rules processed
Details
codecov/patch Coverage not affected when comparing c085aeb...9c663c6
Details
codecov/project 94.27% remains the same compared to c085aeb
Details
deploy/netlify Deploy preview ready!
Details
prettier.prettier Build #20190426.5 succeeded
Details
prettier.prettier (Dev Lint on Linux Node v10) Dev Lint on Linux Node v10 succeeded
Details
prettier.prettier (Dev Test on Linux Node v10) Dev Test on Linux Node v10 succeeded
Details
prettier.prettier (Dev Test on Windows Node v10) Dev Test on Windows Node v10 succeeded
Details
prettier.prettier (Dev Test on macOS Node v10) Dev Test on macOS Node v10 succeeded
Details
prettier.prettier (Prod Build on Linux Node v10) Prod Build on Linux Node v10 succeeded
Details
prettier.prettier (Prod Lint on Linux Node v10) Prod Lint on Linux Node v10 succeeded
Details
prettier.prettier (Prod Pack on Linux Node v10) Prod Pack on Linux Node v10 succeeded
Details
prettier.prettier (Prod Test on macOS Node_v10) Prod Test on macOS Node_v10 succeeded
Details
prettier.prettier (Prod Test on macOS Node_v10_standalone) Prod Test on macOS Node_v10_standalone succeeded
Details
prettier.prettier (Prod Test on macOS Node_v4) Prod Test on macOS Node_v4 succeeded
Details

@evilebottnawi evilebottnawi deleted the issue-5857 branch Apr 30, 2019

@Sceat

This comment has been minimized.

Copy link

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 ?

@evilebottnawi

This comment has been minimized.

Copy link
Member Author

commented May 1, 2019

@Sceat I can't understand you

@Sceat

This comment has been minimized.

Copy link

commented May 2, 2019

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

@j-f1

This comment has been minimized.

Copy link
Member

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.

@automatops automatops referenced this pull request May 13, 2019
0 of 1 task complete

@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.
Projects
None yet
3 participants
You can’t perform that action at this time.