@hyeon/linter 7.0.25 → 7.0.27
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/package.json +1 -1
- package/src/base.mjs +0 -38
- package/src/hansanghyeon.mjs +63 -4
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -1,43 +1,5 @@
|
|
|
1
1
|
import js from '@eslint/js';
|
|
2
|
-
import simpleImportSort from "eslint-plugin-simple-import-sort";
|
|
3
|
-
import importPlugin from 'eslint-plugin-import';
|
|
4
2
|
|
|
5
3
|
export default [
|
|
6
4
|
js.configs.recommended,
|
|
7
|
-
importPlugin.flatConfigs.recommended,
|
|
8
|
-
{
|
|
9
|
-
rules: {
|
|
10
|
-
camelcase: [
|
|
11
|
-
'error',
|
|
12
|
-
{
|
|
13
|
-
properties: 'never',
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
'class-methods-use-this': 'off',
|
|
17
|
-
// tailwindcss를 사용하기때문에 최대길이 제한은 제거함
|
|
18
|
-
// 'max-len': [
|
|
19
|
-
// 'warn',
|
|
20
|
-
// 120,
|
|
21
|
-
// ],
|
|
22
|
-
'no-multi-spaces': [
|
|
23
|
-
'error',
|
|
24
|
-
{
|
|
25
|
-
ignoreEOLComments: true,
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
plugins: {
|
|
32
|
-
"simple-import-sort": simpleImportSort,
|
|
33
|
-
},
|
|
34
|
-
rules: {
|
|
35
|
-
'simple-import-sort/imports': "error",
|
|
36
|
-
"simple-import-sort/exports": "error",
|
|
37
|
-
"import/first": "error",
|
|
38
|
-
"import/newline-after-import": "error",
|
|
39
|
-
"import/no-duplicates": "error",
|
|
40
|
-
"import/no-unresolved": "off"
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
5
|
];
|
package/src/hansanghyeon.mjs
CHANGED
|
@@ -1,8 +1,67 @@
|
|
|
1
|
-
|
|
1
|
+
import simpleImportSort from "eslint-plugin-simple-import-sort";
|
|
2
|
+
import importPlugin from 'eslint-plugin-import';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* import관련 플러그인, 설정
|
|
6
|
+
* simpleImportSort - https://github.com/lydell/eslint-plugin-simple-import-sort
|
|
7
|
+
*/
|
|
8
|
+
const _import = [
|
|
9
|
+
importPlugin.flatConfigs.recommended,
|
|
2
10
|
{
|
|
11
|
+
plugins: {
|
|
12
|
+
"simple-import-sort": simpleImportSort,
|
|
13
|
+
},
|
|
3
14
|
rules: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
+
"import/first": "error",
|
|
37
|
+
"import/newline-after-import": "error",
|
|
38
|
+
"import/no-duplicates": "error",
|
|
39
|
+
"import/no-unresolved": "off"
|
|
40
|
+
},
|
|
7
41
|
},
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
const custom = {
|
|
45
|
+
rules: {
|
|
46
|
+
'no-empty-pattern': 'off',
|
|
47
|
+
'lines-around-comment': ['error', { 'beforeBlockComment': true }],
|
|
48
|
+
camelcase: [
|
|
49
|
+
'error',
|
|
50
|
+
{
|
|
51
|
+
properties: 'never',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
'class-methods-use-this': 'off',
|
|
55
|
+
'no-multi-spaces': [
|
|
56
|
+
'error',
|
|
57
|
+
{
|
|
58
|
+
ignoreEOLComments: true,
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export default [
|
|
65
|
+
custom,
|
|
66
|
+
..._import,
|
|
8
67
|
];
|