@cocopalm/oxc-formatter-config 0.0.14 → 0.0.16
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 +12 -24
- package/package.json +5 -6
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
pnpm add -D prettier @cocopalm/oxc-formatter-config
|
|
8
|
+
pnpm add -D prettier @prettier/plugin-oxc @cocopalm/oxc-formatter-config
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## How to use
|
|
@@ -25,7 +25,9 @@ touch .prettierrc.mjs
|
|
|
25
25
|
```js
|
|
26
26
|
// .prettierrc.mjs
|
|
27
27
|
|
|
28
|
-
'@cocopalm/oxc-formatter-config'
|
|
28
|
+
import config from '@cocopalm/oxc-formatter-config'
|
|
29
|
+
|
|
30
|
+
export default config
|
|
29
31
|
```
|
|
30
32
|
|
|
31
33
|
`package.json` 에 포맷팅 스크립트를 추가해주세요.
|
|
@@ -50,34 +52,20 @@ touch .prettierrc.mjs
|
|
|
50
52
|
|
|
51
53
|
import baseConfig from '@cocopalm/oxc-formatter-config'
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
/**
|
|
56
|
+
* @see https://prettier.io/docs/configuration
|
|
57
|
+
* @type {import("prettier").Config}
|
|
58
|
+
*/
|
|
59
|
+
const config = {
|
|
54
60
|
...baseConfig,
|
|
61
|
+
// 여기에 오버라이딩 설정을 작성할 수 있습니다.
|
|
55
62
|
printWidth: 100,
|
|
56
63
|
semi: true,
|
|
57
64
|
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Examples
|
|
61
|
-
|
|
62
|
-
1. **기본 설정 사용**
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
'@cocopalm/oxc-formatter-config'
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
2. **커스텀 설정 추가**
|
|
70
|
-
|
|
71
|
-
```js
|
|
72
|
-
// .prettierrc.mjs
|
|
73
|
-
import baseConfig from '@cocopalm/oxc-formatter-config'
|
|
66
|
+
export default config
|
|
67
|
+
```
|
|
74
68
|
|
|
75
|
-
export default {
|
|
76
|
-
...baseConfig,
|
|
77
|
-
printWidth: 120,
|
|
78
|
-
singleQuote: false,
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
69
|
|
|
82
70
|
<br />
|
|
83
71
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocopalm/oxc-formatter-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "oxc formatter configuration",
|
|
5
5
|
"author": "puffcocos",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,13 +22,12 @@
|
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"@prettier/plugin-oxc": "^0.1.3"
|
|
27
|
-
},
|
|
28
25
|
"devDependencies": {
|
|
29
|
-
"prettier": "^3.7.4"
|
|
26
|
+
"prettier": "^3.7.4",
|
|
27
|
+
"@prettier/plugin-oxc": "^0.1.3"
|
|
30
28
|
},
|
|
31
29
|
"peerDependencies": {
|
|
32
|
-
"prettier": "^3.7.4"
|
|
30
|
+
"prettier": "^3.7.4",
|
|
31
|
+
"@prettier/plugin-oxc": "^0.1.3"
|
|
33
32
|
}
|
|
34
33
|
}
|