-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
202 lines (200 loc) · 6.7 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
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
{
"plugins": ["@typescript-eslint", "react", "jsx-a11y", "import", "react-hooks", "prettier"],
"env": {
"es6": true,
"node": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"@typescript-eslint/promise-function-async": "off"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json"
},
"rules": {
"react/jsx-filename-extension": [
1,
{
"extensions": [".ts", ".tsx"]
}
],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/jsx-boolean-value": "off",
"react/forbid-prop-types": "off",
"react/prefer-stateless-function": "off",
"react/destructuring-assignment": "error",
"react/default-props-match-prop-types": [
"error",
{
"allowRequiredDefaults": true
}
],
"react/prop-types": "off",
"react/require-default-props": "off",
"react/jsx-wrap-multilines": "off",
"react/sort-comp": [
1,
{
"order": ["static-methods", "static-variables", "instance-variables", "type-annotations", "lifecycle", "everything-else", "render"],
"groups": {
"lifecycle": [
"displayName",
"propTypes",
"contextTypes",
"childContextTypes",
"mixins",
"statics",
"defaultProps",
"constructor",
"getDefaultProps",
"state",
"getInitialState",
"getChildContext",
"getDerivedStateFromProps",
"getDerivedStateFromError",
"componentWillMount",
"UNSAFE_componentWillMount",
"componentDidMount",
"componentWillReceiveProps",
"UNSAFE_componentWillReceiveProps",
"shouldComponentUpdate",
"componentWillUpdate",
"UNSAFE_componentWillUpdate",
"getSnapshotBeforeUpdate",
"componentDidUpdate",
"componentDidCatch",
"componentWillUnmount"
]
}
}
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"import/order": ["error", { "groups": ["builtin", "internal", "external", "index", "parent", "sibling"] }],
"@typescript-eslint/prefer-reduce-type-parameter": "off",
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/no-invalid-this": "off",
"@typescript-eslint/init-declarations": "off",
"@typescript-eslint/method-signature-style": "off",
"@typescript-eslint/prefer-ts-expect-error": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/prefer-readonly": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/default-param-last": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/unified-signatures": "off",
"@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/generic-type-naming": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-type-alias": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/typedef": "off",
"@typescript-eslint/unbound-method": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-untyped-public-signature": "off",
"@typescript-eslint/no-unused-expressions": [
"error",
{
"allowShortCircuit": true,
"allowTernary": true
}
],
"@typescript-eslint/no-console": "off",
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/arrow-body-style": "off",
"@typescript-eslint/quotes": [
"error",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"@typescript-eslint/comma-dangle": "off",
"@typescript-eslint/operator-linebreak": "off",
"@typescript-eslint/no-underscore-dangle": "off",
"import/no-extraneous-dependencies": "off",
"import/no-cycle": "off",
"@typescript-eslint/object-curly-newline": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/await-thenable": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-extra-parens": "off",
"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": false,
"classes": true,
"variables": true
}
],
"@typescript-eslint/space-before-function-paren": [
"error",
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
],
"prefer-const": "error",
"func-names": ["error", "never"],
"wrap-iife": ["error", "any"],
"no-extra-boolean-cast": "off",
"linebreak-style": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/anchor-has-content": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/label-has-for": "off",
"jsx-a11y/label-has-associated-control": "off"
},
"settings": {
"import/resolver": {
"node": {
"moduleDirectory": ["node_modules", "src/"]
}
}
}
}