-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
misc: add command to run prettier on docs #2102
Conversation
Deploy preview for docusaurus-2 ready! Built with commit 14e61ce |
Deploy preview for docusaurus-preview ready! Built with commit 14e61ce |
@@ -17,6 +17,7 @@ | |||
"postinstall": "yarn tsc", | |||
"prettier": "prettier --config .prettierrc --write \"**/*.{js,ts}\"", | |||
"prettier:diff": "prettier --config .prettierrc --list-different \"**/*.{js,ts}\"", | |||
"prettier-docs": "prettier --config .prettierrc --write \"**/*.md\"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in precommit / ci ?
How about mdx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in precommit/ci?
I was undecided about this. But I guess adding to precommit is ok as long as it doesn't fail the CI because of misformatting.
How about mdx?
I initially tried it but there's an issue prettier/prettier#7041 where Prettier doesn't work with MDX. It's fixed in prettier/prettier#6949 but not released yet. When we upgrade Prettier to the next release we can try including support for prettifying MDX.
Motivation
Better formatting for our Markdown files.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Netlify previews.
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.)