-
Notifications
You must be signed in to change notification settings - Fork 704
/
.eslintrc.json
235 lines (235 loc) · 7.38 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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
{
"extends": [
"airbnb",
"eslint:recommended",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:deprecation/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:jest/recommended",
"plugin:jsx-a11y/recommended",
"plugin:playwright/recommended",
"plugin:promise/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:regexp/recommended",
"plugin:sonarjs/recommended-legacy",
"plugin:typescript-sort-keys/recommended",
"plugin:unicorn/recommended",
"prettier",
"next",
"next/core-web-vitals"
],
"plugins": [
"@typescript-eslint",
"import",
"jest",
"jsx-a11y",
"no-relative-import-paths",
"promise",
"react",
"react-hooks-addons",
"regexp",
"sonarjs",
"sort-keys-fix",
"typescript-sort-keys",
"unicorn",
"unused-imports"
],
"rules": {
"@next/next/no-img-element": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/consistent-type-imports": [
"error",
{ "fixStyle": "inline-type-imports", "prefer": "type-imports" }
],
"@typescript-eslint/explicit-function-return-type": [
"error",
{ "allowExpressions": true }
],
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/no-deprecated": "off",
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-invalid-void-type": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-shadow": [
"error",
{
"ignoreFunctionTypeParameterNameValueShadow": false,
"ignoreTypeValueShadow": false
}
],
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/restrict-template-expressions": [
"error",
{ "allowNumber": true }
],
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
"camelcase": "off",
"class-methods-use-this": "off",
"curly": "error",
"import/consistent-type-specifier-style": ["error", "prefer-inline"],
"import/extensions": [
"error",
"ignorePackages",
{ "ts": "never", "tsx": "never" }
],
"import/first": "error",
"import/newline-after-import": "error",
"import/no-cycle": "off",
"import/no-duplicates": ["error", { "prefer-inline": true }],
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": ["*.config.ts", "e2e/**", "__tests__/**"] }
],
"import/order": ["error", { "newlines-between": "never" }],
"import/prefer-default-export": "off",
"jsx-a11y/label-has-associated-control": [
"error",
{
"required": {
"some": ["id", "nesting"]
}
}
],
"jsx-a11y/no-autofocus": "off",
"no-console": ["error", { "allow": ["info", "error"] }],
"no-constant-binary-expression": "error",
"no-implicit-coercion": "error",
"no-new-wrappers": "error",
"no-plusplus": "off",
"no-relative-import-paths/no-relative-import-paths": "error",
"no-restricted-syntax": [
"error",
"ForInStatement",
"LabeledStatement",
"WithStatement"
],
"no-shadow": ["error", { "hoist": "all" }],
"no-undef-init": "error",
"no-underscore-dangle": "off",
"no-unsafe-optional-chaining": "error",
"playwright/expect-expect": "off",
"playwright/no-conditional-in-test": "off",
"playwright/no-skipped-test": "off",
"promise/always-return": "off",
"promise/catch-or-return": "off",
"promise/no-nesting": "off",
"promise/no-callback-in-promise": "off",
"promise/no-promise-in-callback": "off",
"react/function-component-definition": [
"error",
{ "namedComponents": "arrow-function" }
],
"react/hook-use-state": "error",
"react-hooks/exhaustive-deps": "error",
"react/display-name": "off",
"react/jsx-filename-extension": ["error", { "extensions": [".tsx"] }],
"react/jsx-props-no-spreading": "off",
"react/jsx-sort-props": [
"error",
{
"reservedFirst": true,
"shorthandLast": true
}
],
"react/no-unused-prop-types": "error",
"react/no-unused-state": "error",
"react/require-default-props": "off",
"react/require-optimization": "error",
"react-hooks-addons/no-unused-deps": "warn",
"regexp/no-unused-capturing-group": "error",
"regexp/no-useless-assertions": "error",
"regexp/no-useless-flag": "error",
"regexp/strict": "error",
"sonarjs/anchor-is-valid": "off",
"sonarjs/anchor-precedence": "off",
"sonarjs/cognitive-complexity": "off",
"sonarjs/deprecation": "off",
"sonarjs/file-permissions": "off",
"sonarjs/function-return-type": "off",
"sonarjs/media-has-caption": "off",
"sonarjs/mouse-events-a11y": "off",
"sonarjs/new-cap": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-hardcoded-credentials": "off",
"sonarjs/no-hardcoded-ip": "off",
"sonarjs/no-misused-promises": "off",
"sonarjs/no-nested-conditional": "off",
"sonarjs/no-nested-functions": "off",
"sonarjs/no-nested-template-literals": "off",
"sonarjs/no-selector-parameter": "off",
"sonarjs/no-skipped-test": "off",
"sonarjs/no-try-promise": "off",
"sonarjs/no-var": "off",
"sonarjs/prefer-nullish-coalescing": "off",
"sonarjs/pseudo-random": "off",
"sonarjs/slow-regex": "off",
"sonarjs/sonar-max-params": "off",
"sonarjs/sonar-no-unused-vars": "off",
"sonarjs/todo-tag": "off",
"sort-keys-fix/sort-keys-fix": "error",
"unicorn/filename-case": "off",
"unicorn/import-style": [
"error",
{
"styles": {
"path": {
"named": true
}
}
}
],
"unicorn/no-abusive-eslint-disable": "off",
"unicorn/no-array-for-each": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-await-expression-member": "off",
"unicorn/no-unused-properties": "error",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-at": "off",
"unicorn/prefer-global-this": "off",
"unicorn/prefer-node-protocol": "off",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-switch": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/switch-case-braces": ["error", "avoid"],
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
]
},
"overrides": [
{
"files": ["__tests__/**/*.spec.tsx"],
"rules": {
"playwright/no-standalone-expect": "off"
}
}
],
"reportUnusedDisableDirectives": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": true
}
}