@esmate/prettier 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,17 +8,14 @@ Prettier configuration for humans with support for React, Vue, Svelte, Astro, Ta
|
|
|
8
8
|
npm install -D @esmate/prettier prettier
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
If you are using [ESMate CLI](https://www.npmjs.com/package/esmate), it's built-in, so only need to install `prettier
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm install -D prettier
|
|
15
|
-
```
|
|
11
|
+
If you are using [ESMate CLI](https://www.npmjs.com/package/esmate), it's built-in, so only need to install `prettier`.
|
|
16
12
|
|
|
17
13
|
## Usage
|
|
18
14
|
|
|
19
15
|
Define your Prettier configuration in a `prettier.config.js` file:
|
|
20
16
|
|
|
21
17
|
```ts
|
|
18
|
+
// @ts-check
|
|
22
19
|
import { defineConfig } from "@esmate/prettier";
|
|
23
20
|
|
|
24
21
|
export default defineConfig({
|
|
@@ -36,11 +33,11 @@ export default defineConfig({
|
|
|
36
33
|
Run Prettier to check your code:
|
|
37
34
|
|
|
38
35
|
```bash
|
|
39
|
-
prettier --check
|
|
36
|
+
prettier --check .
|
|
40
37
|
```
|
|
41
38
|
|
|
42
39
|
Automatically fix formatting issues:
|
|
43
40
|
|
|
44
41
|
```bash
|
|
45
|
-
prettier --write
|
|
42
|
+
prettier --write .
|
|
46
43
|
```
|