@hyeon/linter 11.0.1 → 11.0.2
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 +25 -2
- package/biome.jsonc +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -37,7 +37,8 @@ package.json scripts에 아래를 추가해줘:
|
|
|
37
37
|
```json
|
|
38
38
|
{
|
|
39
39
|
"lint": "biome ci .",
|
|
40
|
-
"lint:fix": "biome check --write ."
|
|
40
|
+
"lint:fix": "biome check --write .",
|
|
41
|
+
"lint:fix:unsafe": "biome check --write --unsafe ."
|
|
41
42
|
}
|
|
42
43
|
```
|
|
43
44
|
|
|
@@ -49,10 +50,25 @@ package.json scripts에 아래를 추가해줘:
|
|
|
49
50
|
"editor.codeActionsOnSave": {
|
|
50
51
|
"source.fixAll.biome": "explicit",
|
|
51
52
|
"source.organizeImports.biome": "explicit"
|
|
53
|
+
},
|
|
54
|
+
"biome.enabled": true,
|
|
55
|
+
"[javascript]": {
|
|
56
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
57
|
+
},
|
|
58
|
+
"[javascriptreact]": {
|
|
59
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
60
|
+
},
|
|
61
|
+
"[typescript]": {
|
|
62
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
63
|
+
},
|
|
64
|
+
"[typescriptreact]": {
|
|
65
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
52
66
|
}
|
|
53
67
|
}
|
|
54
68
|
```
|
|
55
69
|
|
|
70
|
+
VS Code Biome 확장에서 `Request textDocument/codeAction failed` 또는 `failed to access range` 오류가 발생하면 `editor.codeActionsOnSave` 블록만 제거하고 `biome check --write .` 또는 `lint:fix` 스크립트로 import 정리와 fix를 수동 적용해줘. 이 오류는 설정 파일보다 Biome VS Code/LSP의 저장 시 codeAction 경로에서 발생하는 경우가 많아 formatter만 저장 시 적용하는 구성이 더 안정적이야.
|
|
71
|
+
|
|
56
72
|
.vscode/extensions.json에 아래를 추가해줘:
|
|
57
73
|
```json
|
|
58
74
|
{
|
|
@@ -61,6 +77,7 @@ package.json scripts에 아래를 추가해줘:
|
|
|
61
77
|
```
|
|
62
78
|
|
|
63
79
|
설치 후 biome check --write . 로 전체 포맷을 적용해줘.
|
|
80
|
+
`useOptionalChain`처럼 Biome이 unsafe fix로 분류한 수정까지 적용해야 하면 biome check --write --unsafe . 를 별도로 실행해줘.
|
|
64
81
|
````
|
|
65
82
|
|
|
66
83
|
|
|
@@ -290,11 +307,14 @@ bun add -d @hyeon/linter @biomejs/biome
|
|
|
290
307
|
{
|
|
291
308
|
"scripts": {
|
|
292
309
|
"lint": "biome ci .",
|
|
293
|
-
"lint:fix": "biome check --write ."
|
|
310
|
+
"lint:fix": "biome check --write .",
|
|
311
|
+
"lint:fix:unsafe": "biome check --write --unsafe ."
|
|
294
312
|
}
|
|
295
313
|
}
|
|
296
314
|
```
|
|
297
315
|
|
|
316
|
+
`lint:fix`는 safe fix와 formatter를 적용합니다. `useOptionalChain` 같은 unsafe fix까지 적용해야 할 때만 `lint:fix:unsafe`를 수동으로 실행하세요.
|
|
317
|
+
|
|
298
318
|
---
|
|
299
319
|
|
|
300
320
|
### 1) JavaScript 프로젝트
|
|
@@ -469,6 +489,9 @@ monorepo/
|
|
|
469
489
|
# lint + format + import 정리 한 번에
|
|
470
490
|
npx biome check --write .
|
|
471
491
|
|
|
492
|
+
# unsafe fix까지 적용해야 할 때만 수동 실행
|
|
493
|
+
npx biome check --write --unsafe .
|
|
494
|
+
|
|
472
495
|
# CI (검사만, 수정 없음)
|
|
473
496
|
npx biome ci .
|
|
474
497
|
```
|
package/biome.jsonc
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyeon/linter",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.2",
|
|
4
4
|
"description": "Biome-based lint, format, and import organize configuration",
|
|
5
5
|
"main": "./src/index.mjs",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"lint": "biome ci .",
|
|
9
9
|
"lint:fix": "biome check --write .",
|
|
10
|
+
"lint:fix:unsafe": "biome check --write --unsafe .",
|
|
10
11
|
"test": "npm run lint && npm --prefix test run test:all"
|
|
11
12
|
},
|
|
12
13
|
"repository": {
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
"@biomejs/biome": ">=2.0.0"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@biomejs/biome": "^2.4.
|
|
41
|
+
"@biomejs/biome": "^2.4.13"
|
|
41
42
|
},
|
|
42
43
|
"exports": {
|
|
43
44
|
".": {
|