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

Prettier: set arrowParens always #41136

Closed
wants to merge 5 commits into from

Conversation

sirreal
Copy link
Member

@sirreal sirreal commented Apr 15, 2020

Changes proposed in this Pull Request

Lint issues from conflicting prettier config in eslint? #40118

Testing instructions

Fixes #

sirreal added 5 commits April 15, 2020 12:33
This rule now defaults to es5
- Align with Gutenberg (core).
- Align with Prettier standard config.

See https://prettier.io/blog/2020/03/21/2.0.0.html#change-default-value-for-arrowparens-to-always-7430httpsgithubcomprettierprettierpull7430-by-kachkaevhttpsgithubcomkachkaev

> At first glance, avoiding parentheses in the isolated example above
> may look like a better choice because it results in less visual noise.
> However, when Prettier removes parentheses, it becomes harder to add
> type annotations, extra arguments, default values, or a variety of
> other things. Consistent use of parentheses provides a better
> developer experience when editing real codebases, which justifies the
> change.
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

Caution: This PR affects files in the FSE Plugin on WordPress.com
Please ensure your changes work on WordPress.com before merging.

D41896-code has been created so you can easily test it on your sandbox. See this FieldGuide page about developing in the FSE Plugin for more info: PCYsg-ly5-p2

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@scinos
Copy link
Contributor

scinos commented Apr 20, 2020

Merged in #41114

@scinos scinos closed this Apr 20, 2020
@sirreal sirreal deleted the update/prettier-always-arrow-parens branch April 20, 2020 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants