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

chore(v2): update Prettier config #2542

Merged
merged 3 commits into from
Apr 5, 2020
Merged

chore(v2): update Prettier config #2542

merged 3 commits into from
Apr 5, 2020

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Apr 5, 2020

Motivation

Update config Prettier so that it is consistent with the latest version of ESLint config Airbnb , where you now always need to write parentheses 😢

https://github.com/airbnb/javascript#arrows--one-arg-parens

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

N/A.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Apr 5, 2020
@lex111 lex111 changed the title chore(v2): update prettier config chore(v2): update Prettier config Apr 5, 2020
Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

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

Oh man. Thanks

@yangshun
Copy link
Contributor

yangshun commented Apr 5, 2020

According to https://prettier.io/blog/2020/03/21/2.0.0.html, that's the default option right? Why do we still have to manually specify?

@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit 862375f

https://deploy-preview-2542--docusaurus-2.netlify.com

@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Apr 5, 2020

Deploy preview for docusaurus-2 ready!

Built with commit fb97c3c

https://deploy-preview-2542--docusaurus-2.netlify.com

@yangshun
Copy link
Contributor

yangshun commented Apr 5, 2020

When I upgraded Prettier just now in #2538 I think all the arrow parens were updated. So I think it's the default option now without us having to do anything.

@lex111
Copy link
Contributor Author

lex111 commented Apr 5, 2020

Yes, but my code editor does not know about :)
And so it removes all the parentheses as earlier.

@yangshun
Copy link
Contributor

yangshun commented Apr 5, 2020

Ok let's merge this since it's relatively harmless. But I think if your IDE is using your project's Prettier or has an upgraded Prettier, this wouldn't be an issue.

@yangshun yangshun merged commit 8f0206b into master Apr 5, 2020
@yangshun yangshun added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Apr 5, 2020
@yangshun yangshun deleted the lex111/pre branch April 5, 2020 16:50
mohrash92 pushed a commit to mohrash92/docusaurus that referenced this pull request Apr 11, 2020
* chore(v2): update prettier config

* Update .prettierrc

* --

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants