-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
177 lines (177 loc) · 5.41 KB
/
.eslintrc
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
{
"env": {
"es6": true,
"jest": true,
"browser": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"project": "./tsconfig.eslint.json"
},
"plugins": ["react", "@typescript-eslint", "import", "eslint-plugin-import-helpers"],
"settings": {
"react": {
"version": "detect"
}
},
"extends": [
"plugin:react-hooks/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended",
"eslint:recommended",
"plugin:react/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"rules": {
"react/no-multi-comp": [ "error", { "ignoreStateless": true }],
"react/prefer-stateless-function": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "^__",
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"consistent-return": "error",
"@typescript-eslint/explicit-module-boundary-types": ["error", {
"allowDirectConstAssertionInArrowFunctions": true,
"allowHigherOrderFunctions": true
}],
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/sort-type-union-intersection-members": "error",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/restrict-template-expressions": "error",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-for-in-array": "error",
"no-unneeded-ternary": "error",
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": ["error", {
"ignoreDeclarationMerge": true
}],
"camelcase": "warn",
"curly": "error",
"no-return-await": "off",
"@typescript-eslint/return-await": "error",
"eqeqeq": ["error", "smart"],
"import/no-unresolved": "error",
"no-implicit-coercion": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-empty-pattern": "error",
"no-eval": "error",
"no-extra-semi": "error",
"no-fallthrough": "error",
"no-shadow": "off",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-unused-expressions": "off",
"no-unused-vars": "off",
"prefer-const": "error",
"react-hooks/exhaustive-deps": "error",
"react/react-in-jsx-scope": "off",
"react-hooks/rules-of-hooks": "error",
"react/boolean-prop-naming": ["error", { "validateNested": true }],
"react/jsx-uses-vars": "error",
"react/prop-types": "off",
"use-isnan": "error",
"valid-typeof": "error",
"@typescript-eslint/strict-boolean-expressions": [
"error",
{
"allowString": false,
"allowNumber": false,
"allowNullableBoolean": false,
"allowNullableObject": false,
"allowNullableString": false,
"allowNullableNumber": false,
"allowAny": false
}
],
"@typescript-eslint/no-shadow": [
"warn",
{
"hoist": "all"
}
],
"no-console": [
"error",
{
"allow": [
"error",
"dir",
"timeLog",
"assert",
"clear",
"count",
"countReset",
"group",
"groupEnd",
"table",
"warn",
"info",
"dirxml",
"groupCollapsed",
"Console",
"profile",
"profileEnd",
"timeStamp",
"context"
]
}
],
"import-helpers/order-imports": [
"warn",
{
"newlinesBetween": "always",
"groups": [
["/^react$/", "/^react-/"],
"module",
["parent", "sibling", "index"]
],
"alphabetize": { "order": "asc", "ignoreCase": true }
}
]
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"no-undef": "off"
}
}
]
}