mirror of
https://github.com/flarum/framework.git
synced 2024-11-22 09:24:01 +08:00
Update README.md
This commit is contained in:
parent
ecf016c348
commit
d2bc73b766
|
@ -6,14 +6,21 @@ For more info about shared Prettier configurations, [check out the Prettier docu
|
|||
|
||||
## Usage
|
||||
|
||||
Add the `prettier` key to your `package.json`:
|
||||
1. Install `@flarum/prettier-config` as a dev dependency:
|
||||
|
||||
```
|
||||
npm i -D @flarum/prettier-config
|
||||
yarn add -D @flarum/prettier-config
|
||||
```
|
||||
|
||||
2. Add the `prettier` key to your `package.json`:
|
||||
|
||||
```jsonc
|
||||
// package.json
|
||||
{
|
||||
"name": "my-cool-package",
|
||||
"version": "1.0.0",
|
||||
"prettier": "@flarum/prettier-config"
|
||||
"prettier": "@flarum/prettier-config",
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
@ -22,12 +29,7 @@ Add the `prettier` key to your `package.json`:
|
|||
|
||||
You can extend our config with your own custom options, too. Import our config, then spread its require in a `.prettierrc.js` file.
|
||||
|
||||
Make sure your `package.json` doesn't have the `prettier` key, and that it has `@flarum/prettier-config` as a dev dependency.
|
||||
|
||||
```
|
||||
npm i -D @flarum/prettier-config
|
||||
yarn add -D @flarum/prettier-config
|
||||
```
|
||||
> :warning: Make sure your `package.json` doesn't have the `prettier` key.
|
||||
|
||||
```js
|
||||
// .prettierrc.js
|
||||
|
|
Loading…
Reference in New Issue
Block a user