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

package(prettier-config): update docs #44620

Merged

Conversation

thelovekesh
Copy link
Member

What?

  • Fix doc for extending prettier-config in .prettierrc file.
  • Add step for extending prettier-config in .prettierrc.js file.

Why?

Adding extends: ['@wordpress/prettier-config'] in prettierrc file doesn't really extends the config.

Also, see: https://stackoverflow.com/questions/63963613/configuring-prettier-format-tool-for-wordpress-in-prettierrc

How?

- extends: ['@wordpress/prettier-config']
+ "@wordpress/prettier-config"

Testing Instructions

Try extending the config with both ways inside the code editor and open the extension terminal by:

  • Open the terminal
  • Select the output tab
  • Choose prettier from the dropdown on the right side.
  • Now see the output in both cases.

@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @thelovekesh! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Sep 30, 2022
@gziolo gziolo added the [Tool] Prettier config /packages/prettier-config label Oct 1, 2022
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

I can confirm this is a correct update. I used the same syntax in one of my test projects:

https://github.com/gziolo/wp-block-directory-template/blob/ea020225ef13881eb730550ae0f7c7c57f8944cb/package.json#L56

@gziolo gziolo added the [Type] Developer Documentation Documentation for developers label Oct 5, 2022
@gziolo gziolo merged commit 509cb24 into WordPress:trunk Oct 5, 2022
@thelovekesh thelovekesh deleted the update/docs-prettier-config-package branch October 5, 2022 13:44
@github-actions github-actions bot added this to the Gutenberg 14.4 milestone Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Tool] Prettier config /packages/prettier-config [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants