Recommend pinning prettier version (#2920)
* Recommend pinning prettier version * Change from -E to --exact/--save-exact
This commit is contained in:
1 parent
75781a6d16
commit
ae21d60386
1 file changed
+7
-2
@@ -203,7 +203,7 @@ Prettier does nothing to help with those kind of rules. They are also the most i
|
|||||||
Install:
|
Install:
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn add prettier --dev
|
yarn add prettier --dev --exact
|
||||||
```
|
```
|
||||||
|
|
||||||
You can install it globally if you like:
|
You can install it globally if you like:
|
||||||
@@ -215,9 +215,14 @@ yarn global add prettier
|
|||||||
*We're using `yarn` but you can use `npm` if you like:*
|
*We're using `yarn` but you can use `npm` if you like:*
|
||||||
|
|
||||||
```
|
```
|
||||||
npm install [--save-dev|--global] prettier
|
npm install --save-dev --save-exact prettier
|
||||||
|
# or globally
|
||||||
|
npm install --global prettier
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> We recommend pinning an exact version of prettier in your `package.json`
|
||||||
|
> as we introduce stylistic changes in patch releases.
|
||||||
|
|
||||||
### CLI
|
### CLI
|
||||||
|
|
||||||
Run Prettier through the CLI with this script. Run it without any
|
Run Prettier through the CLI with this script. Run it without any
|
||||||
|
|||||||
Reference in new issue
Block a user