This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
206 lines (200 loc) · 8.3 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier", "react", "react-hooks"],
"env": {
"jest": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended",
"plugin:react/recommended"
],
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/explicit-module-boundary-types": "error"
}
}
],
"parserOptions": {
"extraFileExtensions": [".cjs", ".json"],
"project": ["./tsconfig.json", "./tsconfig.eslint.json"],
"tsconfigRootDir": "./",
"useJSXTextNode": true,
"warnOnUnsupportedTypeScriptVersion": false,
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": false
}
},
"rules": {
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/ban-tslint-comment": "error",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/brace-style": "error",
"@typescript-eslint/class-literal-property-style": ["error", "getters"],
"@typescript-eslint/comma-spacing": "error",
"@typescript-eslint/consistent-indexed-object-style": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/func-call-spacing": "error",
"@typescript-eslint/indent": "error",
"@typescript-eslint/init-declarations": "error",
"@typescript-eslint/keyword-spacing": "error",
"@typescript-eslint/lines-between-class-members": "error",
"@typescript-eslint/member-delimiter-style": "error",
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/naming-convention": "error",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
"@typescript-eslint/no-dupe-class-members": "error",
"@typescript-eslint/no-duplicate-imports": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extra-parens": "error",
"@typescript-eslint/no-extra-semi": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-implicit-any-catch": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-invalid-this": "error",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-loop-func": "error",
"@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-magic-numbers": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-type-alias": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-unused-vars-experimental": "error",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
"@typescript-eslint/object-curly-spacing": "error",
"@typescript-eslint/prefer-enum-initializers": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-literal-enum-member": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-readonly-parameter-types": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/quotes": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/return-await": "error",
"@typescript-eslint/semi": "error",
"@typescript-eslint/sort-type-union-intersection-members": "error",
"@typescript-eslint/space-before-function-paren": "error",
"@typescript-eslint/space-infix-ops": "error",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/typedef": "error",
"@typescript-eslint/unified-signatures": "error",
"brace-style": "off",
"comma-dangle": "off",
"comma-spacing": "off",
"default-param-last": "off",
"dot-notation": "off",
"func-call-spacing": "off",
"indent": "off",
"init-declarations": "off",
"keyword-spacing": "off",
"lines-between-class-members": "off",
"no-dupe-class-members": "off",
"no-duplicate-imports": "off",
"no-empty-function": "off",
"no-extra-parens": "off",
"no-extra-semi": "off",
"no-invalid-this": "off",
"no-loop-func": "off",
"no-loss-of-precision": "off",
"no-magic-numbers": "off",
"no-redeclare": "off",
"no-return-await": "off",
"no-shadow": "off",
"no-throw-literal": "off",
"no-unused-expressions": "off",
"no-unused-vars": "off",
"no-useless-constructor": "off",
"object-curly-spacing": "off",
"prettier/prettier": "error",
"quotes": "off",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react-hooks/exhaustive-deps": "error",
"react-hooks/rules-of-hooks": "error",
"semi": "off",
"space-before-function-paren": "off",
"space-infix-ops": "off",
"@typescript-eslint/comma-dangle": ["error", {
"arrays": "always-multiline",
"enums": "always-multiline",
"exports": "always-multiline",
"functions": "always-multiline",
"generics": "always-multiline",
"imports": "always-multiline",
"objects": "always-multiline",
"tuples": "always-multiline"
}],
"@typescript-eslint/consistent-type-assertions": ["error", {
"assertionStyle": "never",
"objectLiteralTypeAssertions": "never"
}],
"@typescript-eslint/consistent-type-imports": ["error", {
"disallowTypeAnnotations": true,
"prefer": "type-imports"
}],
"react/prop-types": ["error", {
"skipUndeclared": true
}],
"sort-imports": ["error", {
"ignoreDeclarationSort": true
}]
},
"settings": {
"react": {
"version": "detect"
}
}
}