-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.json
More file actions
138 lines (138 loc) · 3.46 KB
/
.eslintrc.json
File metadata and controls
138 lines (138 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
{
"root": true,
"env": {
"browser": true,
"es2021": true,
"node": true
},
"settings": {
"react": {
"version": "detect"
}
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:storybook/recommended",
"plugin:tailwindcss/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react-refresh", "import", "@tanstack/query"],
"rules": {
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
],
"react-refresh/only-export-components": [
"warn",
{
"allowConstantExport": true
}
],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"import/order": [
"error",
{
"groups": [
"builtin",
"internal", // 리액트 내부와 밀접한 연관이 있는 패키지
"external", // 네트워크와 연관이 있는 패키지
"unknown", // 그 외의 경로 미지정된 서드파티 패키지
"object", // core or shared 디렉토리의 소스코드
"parent", // 부모 (../)
"sibling", // 형제 (./)
"index", // 현재 디렉토리
"type" // 타입
],
"pathGroups": [
/**
리액트 내부와 밀접한 연관이 있는 패키지
*/
{
"pattern": "react",
"group": "internal",
"position": "before"
},
{
"pattern": "react-dom/**",
"group": "internal"
},
{
"pattern": "react-router-dom",
"group": "internal"
},
{
"pattern": "@suspensive/react",
"group": "internal"
},
/**
네트워크와 연관이 있는 패키지
*/
{
"pattern": "axios",
"group": "external"
},
{
"pattern": "@tanstack/react-query",
"group": "external"
},
{
"pattern": "@tanstack/react-query-devtools",
"group": "external"
},
/**
core or shared 디렉토리의 소스코드
*/
{
"pattern": "{@,.,..}/core/**",
"group": "object",
"position": "before"
},
{
"pattern": "{@,.,..}/shared/**",
"group": "object"
},
/**
도메인(domain) 디렉토리
*/
{
"pattern": "@/*/**", // 도메인 디렉토리에 들어 있는 각종 파일
"group": "object",
"position": "after"
},
{
"pattern": "@/*", // [domain] 디렉토리의 index.tsx 파일
"group": "object",
"position": "after"
},
/**
부모, 형제, 그 외 서드파티
*/
{
"pattern": "../**",
"group": "parent"
},
{
"pattern": "./**",
"group": "sibling"
},
{
"pattern": "**",
"group": "unknown"
}
],
"pathGroupsExcludedImportTypes": ["@tanstack*"]
}
]
}
}