@cocopalm/oxc-linter-config 0.0.7 → 0.0.9
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 +31 -1
- package/oxlint-react.json +5 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -2,9 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
> ⚠️ oxc linter는 현재 활발히 개발 진행중인 라이브러리입니다. 그로 인해 버전간의 주요 변경사항이 존재할 수 있습니다.
|
|
4
4
|
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @cocopalm/oxc-linter-config
|
|
9
|
+
```
|
|
10
|
+
|
|
5
11
|
## How to use
|
|
6
12
|
|
|
7
|
-
프로젝트 루트 디렉토리에 `.oxlintrc.json` 을 생성합니다.
|
|
13
|
+
프로젝트 루트 디렉토리에 `.oxlintrc.json` 을 생성합니다.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
touch .oxlintrc.json
|
|
17
|
+
```
|
|
18
|
+
|
|
8
19
|
적용하고자 하는 린트 규칙을 `extends` 필드에 정의해주세요.
|
|
9
20
|
|
|
10
21
|
- `oxlint-common.json`
|
|
@@ -25,6 +36,25 @@
|
|
|
25
36
|
}
|
|
26
37
|
```
|
|
27
38
|
|
|
39
|
+
규칙을 오버라이드하고 싶다면 `overrides` 필드를 사용해주세요.
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"extends": [
|
|
44
|
+
"node_modules/@cocopalm/oxc-linter-config/oxlint-common.json",
|
|
45
|
+
"node_modules/@cocopalm/oxc-linter-config/oxlint-react.json"
|
|
46
|
+
],
|
|
47
|
+
"overrides": [
|
|
48
|
+
{
|
|
49
|
+
"files": ["**/*.{ts,tsx}"],
|
|
50
|
+
"rules": {
|
|
51
|
+
"eslint/no-unused-vars": "off"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
28
58
|
<br />
|
|
29
59
|
|
|
30
60
|
## Description
|
package/oxlint-react.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"plugins": ["react", "nextjs", "jsx-a11y"],
|
|
3
|
+
"jsPlugins": ["eslint-plugin-react-hooks"],
|
|
3
4
|
"rules": {
|
|
4
5
|
"react/button-has-type": "warn",
|
|
5
6
|
"react/forward-ref-uses-ref": "error",
|
|
@@ -22,6 +23,9 @@
|
|
|
22
23
|
}
|
|
23
24
|
],
|
|
24
25
|
"react/style-prop-object": "error",
|
|
25
|
-
"react/void-dom-elements-no-children": "error"
|
|
26
|
+
"react/void-dom-elements-no-children": "error",
|
|
27
|
+
"eslint-plugin-react-hooks/rules-of-hooks": "error",
|
|
28
|
+
"eslint-plugin-react-hooks/exhaustive-deps": "warn",
|
|
29
|
+
"eslint-plugin-react-hooks/use-memo": "error"
|
|
26
30
|
}
|
|
27
31
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocopalm/oxc-linter-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "oxc linter configuration",
|
|
5
5
|
"author": "puffcocos",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,5 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"oxlint": "^1.24.0"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"eslint-plugin-react-hooks": "^7.0.0"
|
|
31
34
|
}
|
|
32
35
|
}
|