diff --git a/docs/install.md b/docs/install.md index e2697a854..ed4529c3d 100644 --- a/docs/install.md +++ b/docs/install.md @@ -28,10 +28,15 @@ pnpm add --save-dev --save-exact prettier Then, create an empty config file to let editors and other tools know you are using Prettier: - + ```bash -echo {}> .prettierrc.json +node --eval "fs.writeFileSync('.prettierrc','{}\n')" ``` Next, create a [.prettierignore](ignore.md) file to let the Prettier CLI and editors know which files to _not_ format. Here’s an example: diff --git a/website/versioned_docs/version-stable/install.md b/website/versioned_docs/version-stable/install.md index 84e0ea5ad..4eff0f231 100644 --- a/website/versioned_docs/version-stable/install.md +++ b/website/versioned_docs/version-stable/install.md @@ -29,10 +29,15 @@ pnpm add --save-dev --save-exact prettier Then, create an empty config file to let editors and other tools know you are using Prettier: - + ```bash -echo {}> .prettierrc.json +node --eval "fs.writeFileSync('.prettierrc','{}\n')" ``` Next, create a [.prettierignore](ignore.md) file to let the Prettier CLI and editors know which files to _not_ format. Here’s an example: