@hyeon/linter 11.0.1 → 11.0.3
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 +27 -2
- package/biome.jsonc +9 -2
- 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
|
+
`useSortedClasses` Tailwind class 정렬과 `useOptionalChain`처럼 Biome이 unsafe fix로 분류한 수정까지 적용해야 하면 biome check --write --unsafe . 를 별도로 실행해줘.
|
|
64
81
|
````
|
|
65
82
|
|
|
66
83
|
|
|
@@ -70,6 +87,8 @@ package.json scripts에 아래를 추가해줘:
|
|
|
70
87
|
- Biome 기반 (lint + format + import organize 단일 도구)
|
|
71
88
|
- ESLint/Prettier 레거시 경로는 v11에서 완전 제거됨
|
|
72
89
|
- Tailwind CSS v4의 `@theme`, `@utility` 같은 CSS 지시문은 기본 설정에서 파싱 가능
|
|
90
|
+
- Tailwind CSS class 정렬은 `useSortedClasses`를 기본 `error`로 활성화하며, `clsx`/`cva`/`cn`/`tw` 계열 함수 문자열도 검사
|
|
91
|
+
- Tailwind class 정렬 적용은 Biome unsafe fix에 해당하므로 `lint:fix:unsafe` 또는 `biome check --write --unsafe .` 사용
|
|
73
92
|
|
|
74
93
|
## 왜 Biome인가
|
|
75
94
|
|
|
@@ -290,11 +309,14 @@ bun add -d @hyeon/linter @biomejs/biome
|
|
|
290
309
|
{
|
|
291
310
|
"scripts": {
|
|
292
311
|
"lint": "biome ci .",
|
|
293
|
-
"lint:fix": "biome check --write ."
|
|
312
|
+
"lint:fix": "biome check --write .",
|
|
313
|
+
"lint:fix:unsafe": "biome check --write --unsafe ."
|
|
294
314
|
}
|
|
295
315
|
}
|
|
296
316
|
```
|
|
297
317
|
|
|
318
|
+
`lint:fix`는 safe fix와 formatter를 적용합니다. `useOptionalChain` 같은 unsafe fix까지 적용해야 할 때만 `lint:fix:unsafe`를 수동으로 실행하세요.
|
|
319
|
+
|
|
298
320
|
---
|
|
299
321
|
|
|
300
322
|
### 1) JavaScript 프로젝트
|
|
@@ -469,6 +491,9 @@ monorepo/
|
|
|
469
491
|
# lint + format + import 정리 한 번에
|
|
470
492
|
npx biome check --write .
|
|
471
493
|
|
|
494
|
+
# unsafe fix까지 적용해야 할 때만 수동 실행
|
|
495
|
+
npx biome check --write --unsafe .
|
|
496
|
+
|
|
472
497
|
# CI (검사만, 수정 없음)
|
|
473
498
|
npx biome ci .
|
|
474
499
|
```
|
package/biome.jsonc
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/2.4.
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.4.13/schema.json",
|
|
3
3
|
"vcs": {
|
|
4
4
|
"enabled": true,
|
|
5
5
|
"clientKind": "git",
|
|
@@ -26,7 +26,14 @@
|
|
|
26
26
|
"noUnusedImports": "error",
|
|
27
27
|
"noEmptyPattern": "off"
|
|
28
28
|
},
|
|
29
|
-
"nursery": {
|
|
29
|
+
"nursery": {
|
|
30
|
+
"useSortedClasses": {
|
|
31
|
+
"level": "error",
|
|
32
|
+
"options": {
|
|
33
|
+
"functions": ["clsx", "cva", "cn", "tw", "tw.*"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
30
37
|
}
|
|
31
38
|
},
|
|
32
39
|
"formatter": {
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyeon/linter",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.3",
|
|
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
|
".": {
|