@hyeon/linter 7.0.45 → 7.1.1
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 +4 -2
- package/package.json +4 -5
- package/src/hansanghyeon.mjs +0 -29
- package/src/prettier.mjs +4 -0
package/README.md
CHANGED
|
@@ -18,6 +18,8 @@ export default [
|
|
|
18
18
|
|
|
19
19
|
## vite
|
|
20
20
|
|
|
21
|
+
uninstall
|
|
22
|
+
|
|
21
23
|
```bash
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
+
eslint-plugin-react-hooks eslint-plugin-react-refresh typescript-eslint globals @eslint/js
|
|
25
|
+
```
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyeon/linter",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"description": "Hansanghyun custom eslint settings",
|
|
5
5
|
"main": "./src/index.mjs",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"lint": "eslint . --config=eslintrc.json",
|
|
8
|
-
"test": "npm run lint && tape test/*.js"
|
|
9
|
-
"postpublish": "make postpublish"
|
|
8
|
+
"test": "npm run lint && tape test/*.js"
|
|
10
9
|
},
|
|
11
10
|
"repository": {
|
|
12
11
|
"type": "git",
|
|
@@ -29,12 +28,12 @@
|
|
|
29
28
|
},
|
|
30
29
|
"homepage": "https://github.com/hansanghyeon/linter#readme",
|
|
31
30
|
"dependencies": {
|
|
31
|
+
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
32
32
|
"eslint-config-prettier": "^9.1.0",
|
|
33
33
|
"eslint-plugin-import": "^2.31.0",
|
|
34
34
|
"eslint-plugin-prettier": "^5.2.1",
|
|
35
35
|
"eslint-plugin-react": "^7.37.2",
|
|
36
36
|
"eslint-plugin-react-refresh": "^0.4.16",
|
|
37
|
-
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
38
37
|
"typescript-eslint": "^8.17.0"
|
|
39
38
|
},
|
|
40
39
|
"peerDependencies": {
|
|
@@ -65,4 +64,4 @@
|
|
|
65
64
|
"registry": "https://registry.npmjs.org/",
|
|
66
65
|
"access": "public"
|
|
67
66
|
}
|
|
68
|
-
}
|
|
67
|
+
}
|
package/src/hansanghyeon.mjs
CHANGED
|
@@ -1,38 +1,9 @@
|
|
|
1
|
-
import simpleImportSort from "eslint-plugin-simple-import-sort";
|
|
2
1
|
import importPlugin from 'eslint-plugin-import';
|
|
3
2
|
|
|
4
|
-
/**
|
|
5
|
-
* import관련 플러그인, 설정
|
|
6
|
-
* simpleImportSort - https://github.com/lydell/eslint-plugin-simple-import-sort
|
|
7
|
-
*/
|
|
8
3
|
const _import = [
|
|
9
4
|
importPlugin.flatConfigs.recommended,
|
|
10
5
|
{
|
|
11
|
-
plugins: {
|
|
12
|
-
"simple-import-sort": simpleImportSort,
|
|
13
|
-
},
|
|
14
6
|
rules: {
|
|
15
|
-
"simple-import-sort/imports": [
|
|
16
|
-
"error",
|
|
17
|
-
{
|
|
18
|
-
"groups": [
|
|
19
|
-
// 부수 효과가 있는 import.
|
|
20
|
-
["^\\u0000"],
|
|
21
|
-
// `node:`로 시작하는 Node.js 기본 모듈.
|
|
22
|
-
["^node:"],
|
|
23
|
-
// 패키지들.
|
|
24
|
-
// 문자(또는 숫자, 밑줄)로 시작하거나 `@` 뒤에 문자가 오는 항목.
|
|
25
|
-
["^@?\\w"],
|
|
26
|
-
// 절대 경로 import 및 Vue 스타일의 `@/foo`와 같은 기타 import.
|
|
27
|
-
// 다른 그룹에서 매칭되지 않는 모든 항목.
|
|
28
|
-
["^"],
|
|
29
|
-
// 상대 경로 import.
|
|
30
|
-
// 점(`.`)으로 시작하는 모든 항목.
|
|
31
|
-
["^\\."],
|
|
32
|
-
],
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"simple-import-sort/exports": "error",
|
|
36
7
|
"import/first": "error",
|
|
37
8
|
"import/newline-after-import": "error",
|
|
38
9
|
"import/no-duplicates": "error",
|
package/src/prettier.mjs
CHANGED
|
@@ -14,6 +14,10 @@ export default [
|
|
|
14
14
|
printWidth: 120,
|
|
15
15
|
arrowParens: "always",
|
|
16
16
|
jsxSingleQuote: false,
|
|
17
|
+
"plugins": ["@trivago/prettier-plugin-sort-imports"],
|
|
18
|
+
"importOrder": ["^[^.](.*)$", "^[.]{1,2}/.*$"],
|
|
19
|
+
"importOrderSeparation": true,
|
|
20
|
+
"importOrderSortSpecifiers": true
|
|
17
21
|
}],
|
|
18
22
|
'arrow-body-style': ['error', 'as-needed'],
|
|
19
23
|
'prefer-arrow-callback': 'error',
|