-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
189 lines (189 loc) · 4.71 KB
/
.eslintrc.json
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
{
"env": {
"es2023": true,
"node": true
},
"extends": [
"eslint:recommended",
"prettier",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": true,
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@stylistic", "@typescript-eslint", "import", "unicorn"],
"reportUnusedDisableDirectives": true,
"rules": {
"eqeqeq": [
"error",
"always",
{
"null": "ignore"
}
],
"no-await-in-loop": "error",
"no-console": "error",
"no-else-return": "warn",
"no-implicit-coercion": "error",
"no-param-reassign": "error",
"no-return-await": "error",
"no-self-compare": "error",
"no-undef-init": "warn",
"no-unneeded-ternary": "error",
"no-var": "error",
"object-shorthand": "warn",
"prefer-const": "warn",
"prefer-object-spread": "warn",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "warn",
"import/first": "error",
"import/newline-after-import": "warn",
"import/no-cycle": "error",
"import/no-extraneous-dependencies": [
"error",
{
"includeTypes": true
}
],
"import/no-mutable-exports": "error",
"import/no-self-import": "error",
"import/no-useless-path-segments": "error",
"import/order": [
"warn",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"groups": ["type", "builtin", "external", "internal", "parent", "sibling", "index"],
"newlines-between": "always",
"pathGroups": [
{
"pattern": "@/**",
"group": "internal",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": ["builtin", "internal"],
"warnOnUnassignedImports": true
}
],
"padding-line-between-statements": [
"warn",
{
"blankLine": "always",
"prev": "directive",
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": "block-like"
},
{
"blankLine": "always",
"prev": "block-like",
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": "return"
},
{
"blankLine": "always",
"prev": ["const", "let", "var"],
"next": "*"
},
{
"blankLine": "any",
"prev": ["singleline-const", "singleline-let", "singleline-var"],
"next": ["singleline-const", "singleline-let", "singleline-var"]
}
],
"@typescript-eslint/consistent-type-exports": [
"warn",
{
"fixMixedExportsWithInlineTypeSpecifier": true
}
],
"@typescript-eslint/consistent-type-imports": [
"warn",
{
"fixStyle": "inline-type-imports"
}
],
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/member-ordering": [
"error",
{
"interfaces": {
"order": "natural-case-insensitive"
}
}
],
"@typescript-eslint/method-signature-style": "warn",
"@typescript-eslint/naming-convention": [
"error",
{
"format": ["PascalCase"],
"selector": ["typeLike", "enumMember"]
},
{
"custom": {
"match": false,
"regex": "^I[A-Z]|^(Interface|Props|State)$"
},
"format": ["PascalCase"],
"selector": "interface"
}
],
"@typescript-eslint/no-confusing-void-expression": [
"error",
{
"ignoreArrowShorthand": true
}
],
"@typescript-eslint/no-loop-func": "error",
"@typescript-eslint/no-redundant-type-constituents": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "warn",
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "after-used",
"argsIgnorePattern": "^_",
"ignoreRestSiblings": false,
"vars": "all",
"varsIgnorePattern": "^_"
}
],
"@typescript-eslint/prefer-nullish-coalescing": [
"error",
{
"ignorePrimitives": {
"bigint": true,
"boolean": true,
"number": true,
"string": true
}
}
],
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"unicorn/error-message": "error",
"unicorn/filename-case": [
"error",
{
"case": "kebabCase"
}
],
"unicorn/no-empty-file": "error",
"unicorn/prefer-node-protocol": "warn"
}
}