@cocopalm/oxc-formatter-config 0.0.25 → 0.2.0

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.
Files changed (3) hide show
  1. package/README.ko.md +18 -5
  2. package/README.md +17 -4
  3. package/package.json +1 -1
package/README.ko.md CHANGED
@@ -22,7 +22,7 @@ touch oxfmt.config.ts
22
22
 
23
23
  설정 파일에서 `@cocopalm/oxc-formatter-config`를 불러옵니다.
24
24
 
25
- ```js
25
+ ```ts
26
26
  // oxfmt.config.ts
27
27
 
28
28
  import config from '@cocopalm/oxc-formatter-config'
@@ -30,7 +30,7 @@ import config from '@cocopalm/oxc-formatter-config'
30
30
  export default config
31
31
  ```
32
32
 
33
- `package.json` 포맷팅 스크립트를 추가해주세요.
33
+ `package.json`에 포맷팅 스크립트를 추가해주세요.
34
34
 
35
35
  ```json
36
36
  // package.json
@@ -43,6 +43,19 @@ export default config
43
43
  }
44
44
  ```
45
45
 
46
+ > **참고:** oxfmt는 `oxfmt.config.ts`를 Node.js `import()`로 로드합니다. **Node.js 22**에서는 TypeScript 지원이 기본으로 활성화되어 있지 않으므로 `--experimental-strip-types` 플래그가 필요합니다:
47
+ >
48
+ > ```json
49
+ > {
50
+ > "scripts": {
51
+ > "format": "NODE_OPTIONS='--experimental-strip-types' oxfmt .",
52
+ > "format:check": "NODE_OPTIONS='--experimental-strip-types' oxfmt . --check"
53
+ > }
54
+ > }
55
+ > ```
56
+ >
57
+ > **Node.js 23.6+** 에서는 TypeScript 지원이 stable로 승격되어 플래그 없이도 동작합니다.
58
+
46
59
  ### Config Override
47
60
 
48
61
  기본 설정을 오버라이드하고 싶다면 다음과 같이 설정을 확장할 수 있습니다.
@@ -51,13 +64,13 @@ export default config
51
64
  // oxfmt.config.ts
52
65
 
53
66
  import { defineConfig } from 'oxfmt'
54
- import baseConfig from '@cocopalm/oxc-formatter-config'
67
+ import config from '@cocopalm/oxc-formatter-config'
55
68
 
56
69
  export default defineConfig({
57
- ...baseConfig,
58
- // 여기에 오버라이딩 설정을 작성할 수 있습니다.
70
+ ...config,
59
71
  printWidth: 100,
60
72
  semi: true,
73
+ singleQuote: true,
61
74
  })
62
75
  ```
63
76
 
package/README.md CHANGED
@@ -22,7 +22,7 @@ touch oxfmt.config.ts
22
22
 
23
23
  Import `@cocopalm/oxc-formatter-config` in your configuration file.
24
24
 
25
- ```js
25
+ ```ts
26
26
  // oxfmt.config.ts
27
27
 
28
28
  import config from '@cocopalm/oxc-formatter-config'
@@ -43,6 +43,19 @@ Add formatting scripts to your `package.json`.
43
43
  }
44
44
  ```
45
45
 
46
+ > **Note:** oxfmt loads `oxfmt.config.ts` via Node.js `import()`. On **Node.js 22**, TypeScript support is not enabled by default, so you need to add `--experimental-strip-types`:
47
+ >
48
+ > ```json
49
+ > {
50
+ > "scripts": {
51
+ > "format": "NODE_OPTIONS='--experimental-strip-types' oxfmt .",
52
+ > "format:check": "NODE_OPTIONS='--experimental-strip-types' oxfmt . --check"
53
+ > }
54
+ > }
55
+ > ```
56
+ >
57
+ > On **Node.js 23.6+**, TypeScript support is stable and no flag is needed.
58
+
46
59
  ### Config Override
47
60
 
48
61
  If you want to override the default settings, you can extend the configuration as follows.
@@ -51,13 +64,13 @@ If you want to override the default settings, you can extend the configuration a
51
64
  // oxfmt.config.ts
52
65
 
53
66
  import { defineConfig } from 'oxfmt'
54
- import baseConfig from '@cocopalm/oxc-formatter-config'
67
+ import config from '@cocopalm/oxc-formatter-config'
55
68
 
56
69
  export default defineConfig({
57
- ...baseConfig,
58
- // Add your custom overrides here.
70
+ ...config,
59
71
  printWidth: 100,
60
72
  semi: true,
73
+ singleQuote: true,
61
74
  })
62
75
  ```
63
76
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocopalm/oxc-formatter-config",
3
- "version": "0.0.25",
3
+ "version": "0.2.0",
4
4
  "description": "oxc formatter configuration",
5
5
  "author": "puffcocos",
6
6
  "license": "MIT",