Update docs (#13309)

This commit is contained in:
fisker Cheung authored and GitHub committed 2022-09-26 19:28:43 +08:00
1 parent 04faada98b
commit 822f354ceb
7 files changed
+153 -70

No files matched your search

+4 -4
View File
@@ -30,7 +30,7 @@ echo {}> .prettierrc.json
Next, create a [.prettierignore](ignore.md) file to let the Prettier CLI and editors know which files to _not_ format. Here’s an example:
```
```text
# Ignore artifacts:
build
coverage
@@ -46,7 +46,7 @@ Now, format all files with Prettier:
<!--npm-->
```bash
npx prettier --write .
npx prettier . --write
```
> What is that `npx` thing? `npx` ships with `npm` and lets you run locally installed tools. We’ll leave off the `npx` part for brevity throughout the rest of this file!
@@ -56,7 +56,7 @@ npx prettier --write .
<!--yarn-->
```bash
yarn prettier --write .
yarn prettier . --write
```
> What is `yarn` doing at the start? `yarn prettier` runs the locally installed version of Prettier. We’ll leave off the `yarn` part for brevity throughout the rest of this file!
@@ -68,7 +68,7 @@ yarn prettier --write .
If you have a CI setup, run the following as part of it to make sure that everyone runs Prettier. This avoids merge conflicts and other collaboration issues!
```bash
npx prettier --check .
npx prettier . --check
```
`--check` is like `--write`, but only checks that files are already formatted, rather than overwriting them. `prettier --write` and `prettier --check` are the most common ways to run Prettier.