/
rules.js
320 lines (301 loc) · 10.4 KB
/
rules.js
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
// These rules are automatically generated by scripts/generate-rules.ts
const eslintRules = {
"array-callback-return": "off",
"constructor-super": "off",
"default-case-last": "off",
"eqeqeq": "off",
"for-direction": "off",
"getter-return": "off",
"no-this-before-super": "off",
"no-array-constructor": "off",
"no-async-promise-executor": "off",
"no-bitwise": "off",
"no-caller": "off",
"no-case-declarations": "off",
"no-class-assign": "off",
"no-compare-neg-zero": "off",
"no-cond-assign": "off",
"no-console": "off",
"no-const-assign": "off",
"no-constant-binary-expression": "off",
"no-constant-condition": "off",
"no-control-regex": "off",
"no-debugger": "off",
"no-delete-var": "off",
"no-dupe-class-members": "off",
"no-dupe-else-if": "off",
"no-dupe-keys": "off",
"no-duplicate-case": "off",
"no-empty": "off",
"no-empty-character-class": "off",
"no-empty-pattern": "off",
"no-empty-static-block": "off",
"no-eval": "off",
"no-ex-assign": "off",
"no-extra-boolean-cast": "off",
"no-fallthrough": "off",
"no-func-assign": "off",
"no-global-assign": "off",
"no-import-assign": "off",
"no-inner-declarations": "off",
"no-irregular-whitespace": "off",
"no-loss-of-precision": "off",
"no-mixed-operators": "off",
"no-new-symbol": "off",
"no-new-wrappers": "off",
"no-nonoctal-decimal-escape": "off",
"no-obj-calls": "off",
"no-prototype-builtins": "off",
"no-redeclare": "off",
"no-regex-spaces": "off",
"no-return-await": "off",
"no-self-assign": "off",
"no-self-compare": "off",
"no-setter-return": "off",
"no-shadow-restricted-names": "off",
"no-sparse-arrays": "off",
"no-undef": "off",
"no-unsafe-finally": "off",
"no-unsafe-negation": "off",
"no-unsafe-optional-chaining": "off",
"no-unused-labels": "off",
"no-unused-private-class-members": "off",
"no-useless-catch": "off",
"no-useless-escape": "off",
"no-var": "off",
"no-void": "off",
"require-yield": "off",
"use-isnan": "off",
"valid-typeof": "off"
}
const typescriptRules = {
"@typescript-eslint/adjacent-overload-signatures": "off",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-tslint-comment": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-duplicate-enum-values": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extra-non-null-assertion": "off",
"@typescript-eslint/no-misused-new": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-unnecessary-type-constraint": "off",
"@typescript-eslint/no-unsafe-declaration-merging": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-as-const": "off",
"@typescript-eslint/prefer-function-type": "off",
"@typescript-eslint/prefer-ts-expect-error": "off",
"@typescript-eslint/triple-slash-reference": "off"
}
const jestRules = {
"jest/expect-expect": "off",
"jest/max-expects": "off",
"jest/no-alias-methods": "off",
"jest/no-commented-out-tests": "off",
"jest/no-conditional-expect": "off",
"jest/no-confusing-set-timeout": "off",
"jest/no-deprecated-functions": "off",
"jest/no-disabled-tests": "off",
"jest/no-done-callback": "off",
"jest/no-export": "off",
"jest/no-focused-tests": "off",
"jest/no-hooks": "off",
"jest/no-identical-title": "off",
"jest/no-interpolation-in-snapshots": "off",
"jest/no-jasmine-globals": "off",
"jest/no-mocks-import": "off",
"jest/no-restricted-jest-methods": "off",
"jest/no-restricted-matchers": "off",
"jest/no-standalone-expect": "off",
"jest/no-test-prefixes": "off",
"jest/no-test-return-statement": "off",
"jest/prefer-called-with": "off",
"jest/prefer-equality-matcher": "off",
"jest/prefer-todo": "off",
"jest/require-to-throw-message": "off",
"jest/valid-describe-callback": "off",
"jest/valid-expect": "off",
"jest/valid-title": "off"
}
const unicornRules = {
"unicorn/catch-error-name": "off",
"unicorn/prefer-node-protocol": "off",
"unicorn/empty-brace-spaces": "off",
"unicorn/error-message": "off",
"unicorn/escape-case": "off",
"unicorn/explicit-length-check": "off",
"unicorn/filename-case": "off",
"unicorn/new-for-builtins": "off",
"unicorn/no-abusive-eslint-disable": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-array-for-each": "off",
"unicorn/no-await-expression-member": "off",
"unicorn/no-console-spaces": "off",
"unicorn/no-document-cookie": "off",
"unicorn/no-empty-file": "off",
"unicorn/no-hex-escape": "off",
"unicorn/no-instanceof-array": "off",
"unicorn/no-invalid-remove-event-listener": "off",
"unicorn/no-lonely-if": "off",
"unicorn/no-negated-condition": "off",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "off",
"unicorn/no-new-buffer": "off",
"unicorn/no-null": "off",
"unicorn/no-object-as-default-parameter": "off",
"unicorn/no-process-exit": "off",
"unicorn/no-static-only-class": "off",
"unicorn/no-thenable": "off",
"unicorn/no-this-assignment": "off",
"unicorn/no-typeof-undefined": "off",
"unicorn/no-unnecessary-await": "off",
"unicorn/no-unreadable-array-destructuring": "off",
"unicorn/no-unreadable-iife": "off",
"unicorn/no-useless-fallback-in-spread": "off",
"unicorn/no-useless-length-check": "off",
"unicorn/no-useless-promise-resolve-reject": "off",
"unicorn/no-useless-switch-case": "off",
"unicorn/no-zero-fractions": "off",
"unicorn/number-literal-case": "off",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-add-event-listener": "off",
"unicorn/prefer-array-flat-map": "off",
"unicorn/prefer-array-flat": "off",
"unicorn/prefer-array-some": "off",
"unicorn/prefer-blob-reading-methods": "off",
"unicorn/prefer-code-point": "off",
"unicorn/prefer-date-now": "off",
"unicorn/prefer-dom-node-append": "off",
"unicorn/prefer-dom-node-dataset": "off",
"unicorn/prefer-dom-node-remove": "off",
"unicorn/prefer-dom-node-text-content": "off",
"unicorn/prefer-event-target": "off",
"unicorn/prefer-includes": "off",
"unicorn/prefer-logical-operator-over-ternary": "off",
"unicorn/prefer-math-trunc": "off",
"unicorn/prefer-modern-dom-apis": "off",
"unicorn/prefer-modern-math-apis": "off",
"unicorn/prefer-native-coercion-functions": "off",
"unicorn/no-useless-spread": "off",
"unicorn/prefer-number-properties": "off",
"unicorn/prefer-optional-catch-binding": "off",
"unicorn/prefer-prototype-methods": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-reflect-apply": "off",
"unicorn/prefer-regexp-test": "off",
"unicorn/prefer-set-size": "off",
"unicorn/prefer-spread": "off",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-string-slice": "off",
"unicorn/prefer-string-starts-ends-with": "off",
"unicorn/prefer-string-trim-start-end": "off",
"unicorn/prefer-type-error": "off",
"unicorn/require-array-join-separator": "off",
"unicorn/require-number-to-fixed-digits-argument": "off",
"unicorn/switch-case-braces": "off",
"unicorn/text-encoding-identifier-case": "off",
"unicorn/throw-new-error": "off"
}
const reactRules = {
"react/button-has-type": "off",
"react/jsx-no-target-blank": "off",
"react/jsx-key": "off",
"react/jsx-no-comment-textnodes": "off",
"react/jsx-no-duplicate-props": "off",
"react/jsx-no-useless-fragment": "off",
"react/jsx-no-undef": "off",
"react/react-in-jsx-scope": "off",
"react/no-children-prop": "off",
"react/no-danger": "off",
"react/no-direct-mutation-state": "off",
"react/no-find-dom-node": "off",
"react/no-render-return-value": "off",
"react/no-string-refs": "off",
"react/no-unescaped-entities": "off",
"react/no-is-mounted": "off",
"react/no-unknown-property": "off",
"react/require-render-return": "off",
"react/void-dom-elements-no-children": "off"
}
const reactPerfRules = {
"react-perf/jsx-no-jsx-as-prop": "off",
"react-perf/jsx-no-new-array-as-prop": "off",
"react-perf/jsx-no-new-function-as-prop": "off",
"react-perf/jsx-no-new-object-as-prop": "off"
}
const importRules = {
"import/default": "off",
"import/export": "off",
"import/named": "off",
"import/namespace": "off",
"import/no-amd": "off",
"import/no-cycle": "off",
"import/no-deprecated": "off",
"import/no-named-as-default": "off",
"import/no-named-as-default-member": "off",
"import/no-self-import": "off",
"import/no-unresolved": "off",
"import/no-unused-modules": "off",
"import/no-duplicates": "off"
}
const jsxA11yRules = {
"jsx-a11y/alt-text": "off",
"jsx-a11y/anchor-has-content": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/aria-activedescendant-has-tabindex": "off",
"jsx-a11y/aria-props": "off",
"jsx-a11y/aria-unsupported-elements": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/heading-has-content": "off",
"jsx-a11y/html-has-lang": "off",
"jsx-a11y/lang": "off",
"jsx-a11y/iframe-has-title": "off",
"jsx-a11y/img-redundant-alt": "off",
"jsx-a11y/media-has-caption": "off",
"jsx-a11y/mouse-events-have-key-events": "off",
"jsx-a11y/no-access-key": "off",
"jsx-a11y/no-aria-hidden-on-focusable": "off",
"jsx-a11y/no-autofocus": "off",
"jsx-a11y/no-redundant-roles": "off",
"jsx-a11y/prefer-tag-over-role": "off",
"jsx-a11y/role-has-required-aria-props": "off",
"jsx-a11y/scope": "off",
"jsx-a11y/tabindex-no-positive": "off",
"jsx-a11y/aria-role": "off",
"jsx-a11y/no-distracting-elements": "off",
"jsx-a11y/role-supports-aria-props": "off",
"jsx-a11y/autocomplete-valid": "off"
}
const nextjsRules = {
"nextjs/google-font-display": "off",
"nextjs/google-font-preconnect": "off",
"nextjs/inline-script-id": "off",
"nextjs/next-script-for-ga": "off",
"nextjs/no-assign-module-variable": "off",
"nextjs/no-async-client-component": "off",
"nextjs/no-css-tags": "off",
"nextjs/no-head-element": "off",
"nextjs/no-head-import-in-document": "off",
"nextjs/no-img-element": "off",
"nextjs/no-script-component-in-head": "off",
"nextjs/no-sync-scripts": "off",
"nextjs/no-title-in-document-head": "off",
"nextjs/no-typos": "off",
"nextjs/no-document-import-in-page": "off",
"nextjs/no-unwanted-polyfillio": "off",
"nextjs/no-before-interactive-script-outside-document": "off"
}
export {
eslintRules,
typescriptRules,
jestRules,
unicornRules,
reactRules,
reactPerfRules,
importRules,
jsxA11yRules,
nextjsRules
}