zeno-config 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,533 @@
1
+ const getTypescriptPluginRules = () => {
2
+ return {
3
+ // https://typescript-eslint.io/rules/adjacent-overload-signatures
4
+ '@typescript-eslint/adjacent-overload-signatures': 'error',
5
+
6
+ // https://typescript-eslint.io/rules/array-type
7
+ '@typescript-eslint/array-type': [
8
+ 'error',
9
+ {
10
+ default: 'array',
11
+ readonly: 'array',
12
+ },
13
+ ],
14
+
15
+ // https://typescript-eslint.io/rules/await-thenable
16
+ // requires type information
17
+ '@typescript-eslint/await-thenable': 'off',
18
+
19
+ // https://typescript-eslint.io/rules/ban-ts-comment
20
+ '@typescript-eslint/ban-ts-comment': 'error',
21
+
22
+ // https://typescript-eslint.io/rules/ban-tslint-comment
23
+ '@typescript-eslint/ban-tslint-comment': 'error',
24
+
25
+ // https://typescript-eslint.io/rules/class-literal-property-style
26
+ '@typescript-eslint/class-literal-property-style': 'error',
27
+
28
+ // https://typescript-eslint.io/rules/class-methods-use-this
29
+ 'class-methods-use-this': 'off',
30
+ '@typescript-eslint/class-methods-use-this': 'off',
31
+
32
+ // https://typescript-eslint.io/rules/consistent-generic-constructors
33
+ '@typescript-eslint/consistent-generic-constructors': 'error',
34
+
35
+ // https://typescript-eslint.io/rules/consistent-indexed-object-style
36
+ '@typescript-eslint/consistent-indexed-object-style': 'error',
37
+
38
+ // https://typescript-eslint.io/rules/consistent-return
39
+ 'consistent-return': 'off',
40
+ '@typescript-eslint/consistent-return': 'off',
41
+
42
+ // https://typescript-eslint.io/rules/consistent-type-assertions
43
+ '@typescript-eslint/consistent-type-assertions': 'error',
44
+
45
+ // https://typescript-eslint.io/rules/consistent-type-definitions
46
+ '@typescript-eslint/consistent-type-definitions': 'error',
47
+
48
+ // https://typescript-eslint.io/rules/consistent-type-exports
49
+ // requires type information
50
+ '@typescript-eslint/consistent-type-exports': 'off',
51
+
52
+ // TODO: test this, might conflict with import plugin
53
+ // https://typescript-eslint.io/rules/consistent-type-imports
54
+ '@typescript-eslint/consistent-type-imports': 'off',
55
+
56
+ // https://typescript-eslint.io/rules/default-param-last
57
+ 'default-param-last': 'off',
58
+ '@typescript-eslint/default-param-last': 'error',
59
+
60
+ // https://typescript-eslint.io/rules/dot-notation
61
+ // requires type information
62
+ // 'dot-notation': 'off',
63
+ '@typescript-eslint/dot-notation': 'off',
64
+
65
+ // https://typescript-eslint.io/rules/explicit-function-return-type
66
+ '@typescript-eslint/explicit-function-return-type': 'off',
67
+
68
+ // https://typescript-eslint.io/rules/explicit-member-accessibility
69
+ '@typescript-eslint/explicit-member-accessibility': 'off',
70
+
71
+ // https://typescript-eslint.io/rules/explicit-module-boundary-types
72
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
73
+
74
+ // https://typescript-eslint.io/rules/init-declarations
75
+ // 'init-declarations': 'off',
76
+ '@typescript-eslint/init-declarations': 'off',
77
+
78
+ // https://typescript-eslint.io/rules/max-params
79
+ // 'max-params': 'off',
80
+ '@typescript-eslint/max-params': 'off',
81
+
82
+ // TODO: test
83
+ // https://typescript-eslint.io/rules/member-ordering
84
+ '@typescript-eslint/member-ordering': 'off',
85
+
86
+ // https://typescript-eslint.io/rules/method-signature-style
87
+ '@typescript-eslint/method-signature-style': 'error',
88
+
89
+ // https://typescript-eslint.io/rules/naming-convention
90
+ // requires type information
91
+ '@typescript-eslint/naming-convention': 'off',
92
+
93
+ // https://typescript-eslint.io/rules/no-array-constructor
94
+ 'no-array-constructor': 'off',
95
+ '@typescript-eslint/no-array-constructor': 'error',
96
+
97
+ // https://typescript-eslint.io/rules/no-array-delete
98
+ // requires type information
99
+ '@typescript-eslint/no-array-delete': 'off',
100
+
101
+ // https://typescript-eslint.io/rules/no-base-to-string
102
+ // requires type information
103
+ '@typescript-eslint/no-base-to-string': 'off',
104
+
105
+ // https://typescript-eslint.io/rules/no-confusing-non-null-assertion
106
+ '@typescript-eslint/no-confusing-non-null-assertion': 'error',
107
+
108
+ // https://typescript-eslint.io/rules/no-confusing-void-expression
109
+ // requires type information
110
+ '@typescript-eslint/no-confusing-void-expression': 'off',
111
+
112
+ // https://typescript-eslint.io/rules/no-deprecated
113
+ // requires type information
114
+ '@typescript-eslint/no-deprecated': 'off',
115
+
116
+ // https://typescript-eslint.io/rules/no-dupe-class-members
117
+ 'no-dupe-class-members': 'off',
118
+ '@typescript-eslint/no-dupe-class-members': 'off', // ts compiler checks this
119
+
120
+ // https://typescript-eslint.io/rules/no-duplicate-enum-values
121
+ '@typescript-eslint/no-duplicate-enum-values': 'error',
122
+
123
+ // https://typescript-eslint.io/rules/no-duplicate-type-constituents
124
+ // requires type information
125
+ '@typescript-eslint/no-duplicate-type-constituents': 'off',
126
+
127
+ // https://typescript-eslint.io/rules/no-dynamic-delete
128
+ '@typescript-eslint/no-dynamic-delete': 'off',
129
+
130
+ // https://typescript-eslint.io/rules/no-empty-function
131
+ 'no-empty-function': 'off',
132
+ '@typescript-eslint/no-empty-function': [
133
+ 'error',
134
+ {
135
+ allow: ['arrowFunctions'],
136
+ },
137
+ ],
138
+
139
+ // https://typescript-eslint.io/rules/no-empty-interface
140
+ '@typescript-eslint/no-empty-interface': 'off',
141
+
142
+ // https://typescript-eslint.io/rules/no-empty-object-type
143
+ '@typescript-eslint/no-empty-object-type': 'error',
144
+
145
+ // https://typescript-eslint.io/rules/no-explicit-any
146
+ '@typescript-eslint/no-explicit-any': 'error',
147
+
148
+ // https://typescript-eslint.io/rules/no-extra-non-null-assertion
149
+ '@typescript-eslint/no-extra-non-null-assertion': 'error',
150
+
151
+ // https://typescript-eslint.io/rules/no-extraneous-class
152
+ '@typescript-eslint/no-extraneous-class': 'error',
153
+
154
+ // https://typescript-eslint.io/rules/no-floating-promises
155
+ // requires type information
156
+ '@typescript-eslint/no-floating-promises': 'off',
157
+
158
+ // https://typescript-eslint.io/rules/no-for-in-array
159
+ // requires type information
160
+ '@typescript-eslint/no-for-in-array': 'off',
161
+
162
+ // https://typescript-eslint.io/rules/no-implied-eval
163
+ // requires type information
164
+ // 'no-implied-eval': 'off',
165
+ '@typescript-eslint/no-implied-eval': 'off',
166
+
167
+ // https://typescript-eslint.io/rules/no-import-type-side-effects
168
+ '@typescript-eslint/no-import-type-side-effects': 'off',
169
+
170
+ // https://typescript-eslint.io/rules/no-inferrable-types
171
+ '@typescript-eslint/no-inferrable-types': 'error',
172
+
173
+ // https://typescript-eslint.io/rules/no-invalid-this
174
+ 'no-invalid-this': 'off',
175
+ '@typescript-eslint/no-invalid-this': 'off',
176
+
177
+ // https://typescript-eslint.io/rules/no-invalid-void-type
178
+ '@typescript-eslint/no-invalid-void-type': 'error',
179
+
180
+ // https://typescript-eslint.io/rules/no-loop-func
181
+ 'no-loop-func': 'off',
182
+ '@typescript-eslint/no-loop-func': 'error',
183
+
184
+ // https://typescript-eslint.io/rules/no-loss-of-precision
185
+ // 'no-loss-of-precision': 'off',
186
+ '@typescript-eslint/no-loss-of-precision': 'off', // deprecated, base rule handles this
187
+
188
+ // https://typescript-eslint.io/rules/no-magic-numbers
189
+ 'no-magic-numbers': 'off',
190
+ '@typescript-eslint/no-magic-numbers': 'off',
191
+
192
+ // https://typescript-eslint.io/rules/no-meaningless-void-operator
193
+ // requires type information
194
+ '@typescript-eslint/no-meaningless-void-operator': 'off',
195
+
196
+ // https://typescript-eslint.io/rules/no-misused-new
197
+ '@typescript-eslint/no-misused-new': 'error',
198
+
199
+ // https://typescript-eslint.io/rules/no-misused-promises
200
+ // requires type information
201
+ '@typescript-eslint/no-misused-promises': 'off',
202
+
203
+ // https://typescript-eslint.io/rules/no-misused-spread
204
+ // requires type information
205
+ '@typescript-eslint/no-misused-spread': 'off',
206
+
207
+ // https://typescript-eslint.io/rules/no-mixed-enums
208
+ // requires type information
209
+ '@typescript-eslint/no-mixed-enums': 'off',
210
+
211
+ // https://typescript-eslint.io/rules/no-namespace
212
+ '@typescript-eslint/no-namespace': 'error',
213
+
214
+ // https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing
215
+ '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
216
+
217
+ // https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain
218
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
219
+
220
+ // https://typescript-eslint.io/rules/no-non-null-assertion
221
+ '@typescript-eslint/no-non-null-assertion': 'error',
222
+
223
+ // https://typescript-eslint.io/rules/no-redeclare
224
+ 'no-redeclare': 'off',
225
+ '@typescript-eslint/no-redeclare': 'off', // ts compiler checks this
226
+
227
+ // https://typescript-eslint.io/rules/no-redundant-type-constituents
228
+ // requires type information
229
+ '@typescript-eslint/no-redundant-type-constituents': 'off',
230
+
231
+ // https://typescript-eslint.io/rules/no-require-imports
232
+ '@typescript-eslint/no-require-imports': 'error',
233
+
234
+ // https://typescript-eslint.io/rules/no-restricted-imports
235
+ // 'no-restricted-imports': 'off',
236
+ '@typescript-eslint/no-restricted-imports': 'off',
237
+
238
+ // https://typescript-eslint.io/rules/no-restricted-types
239
+ '@typescript-eslint/no-restricted-types': 'off',
240
+
241
+ // https://typescript-eslint.io/rules/no-shadow
242
+ 'no-shadow': 'off',
243
+ '@typescript-eslint/no-shadow': 'error',
244
+
245
+ // https://typescript-eslint.io/rules/no-this-alias
246
+ '@typescript-eslint/no-this-alias': 'error',
247
+
248
+ // https://typescript-eslint.io/rules/no-type-alias
249
+ '@typescript-eslint/no-type-alias': 'off', // deprecated
250
+
251
+ // https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare
252
+ // requires type information
253
+ '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
254
+
255
+ // https://typescript-eslint.io/rules/no-unnecessary-condition
256
+ // requires type information
257
+ '@typescript-eslint/no-unnecessary-condition': 'off',
258
+
259
+ // https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment
260
+ '@typescript-eslint/no-unnecessary-parameter-property-assignment':
261
+ 'error',
262
+
263
+ // https://typescript-eslint.io/rules/no-unnecessary-qualifier
264
+ // requires type information
265
+ '@typescript-eslint/no-unnecessary-qualifier': 'off',
266
+
267
+ // https://typescript-eslint.io/rules/no-unnecessary-template-expression
268
+ // requires type information
269
+ '@typescript-eslint/no-unnecessary-template-expression': 'off',
270
+
271
+ // https://typescript-eslint.io/rules/no-unnecessary-type-arguments
272
+ // requires type information
273
+ '@typescript-eslint/no-unnecessary-type-arguments': 'off',
274
+
275
+ // https://typescript-eslint.io/rules/no-unnecessary-type-assertion
276
+ // requires type information
277
+ '@typescript-eslint/no-unnecessary-type-assertion': 'off',
278
+
279
+ // https://typescript-eslint.io/rules/no-unnecessary-type-constraint
280
+ '@typescript-eslint/no-unnecessary-type-constraint': 'error',
281
+
282
+ // https://typescript-eslint.io/rules/no-unnecessary-type-conversion
283
+ // requires type information
284
+ '@typescript-eslint/no-unnecessary-type-conversion': 'off',
285
+
286
+ // https://typescript-eslint.io/rules/no-unnecessary-type-parameters
287
+ // requires type information
288
+ '@typescript-eslint/no-unnecessary-type-parameters': 'off',
289
+
290
+ // https://typescript-eslint.io/rules/no-unsafe-argument
291
+ // requires type information
292
+ '@typescript-eslint/no-unsafe-argument': 'off',
293
+
294
+ // https://typescript-eslint.io/rules/no-unsafe-assignment
295
+ // requires type information
296
+ '@typescript-eslint/no-unsafe-assignment': 'off',
297
+
298
+ // https://typescript-eslint.io/rules/no-unsafe-call
299
+ // requires type information
300
+ '@typescript-eslint/no-unsafe-call': 'off',
301
+
302
+ // https://typescript-eslint.io/rules/no-unsafe-declaration-merging
303
+ '@typescript-eslint/no-unsafe-declaration-merging': 'error',
304
+
305
+ // https://typescript-eslint.io/rules/no-unsafe-enum-comparison
306
+ // requires type information
307
+ '@typescript-eslint/no-unsafe-enum-comparison': 'off',
308
+
309
+ // https://typescript-eslint.io/rules/no-unsafe-function-type
310
+ '@typescript-eslint/no-unsafe-function-type': 'error',
311
+
312
+ // https://typescript-eslint.io/rules/no-unsafe-member-access
313
+ // requires type information
314
+ '@typescript-eslint/no-unsafe-member-access': 'off',
315
+
316
+ // https://typescript-eslint.io/rules/no-unsafe-return
317
+ // requires type information
318
+ '@typescript-eslint/no-unsafe-return': 'off',
319
+
320
+ // https://typescript-eslint.io/rules/no-unsafe-type-assertion
321
+ // requires type information
322
+ '@typescript-eslint/no-unsafe-type-assertion': 'off',
323
+
324
+ // https://typescript-eslint.io/rules/no-unsafe-unary-minus
325
+ // requires type information
326
+ '@typescript-eslint/no-unsafe-unary-minus': 'off',
327
+
328
+ // https://typescript-eslint.io/rules/no-unused-expressions
329
+ 'no-unused-expressions': 'off',
330
+ '@typescript-eslint/no-unused-expressions': [
331
+ 'error',
332
+ {
333
+ enforceForJSX: true,
334
+ },
335
+ ],
336
+
337
+ // https://typescript-eslint.io/rules/no-unused-private-class-members
338
+ 'no-unused-private-class-members': 'off',
339
+ '@typescript-eslint/no-unused-private-class-members': 'error',
340
+
341
+ // https://typescript-eslint.io/rules/no-unused-vars
342
+ 'no-unused-vars': 'off',
343
+ '@typescript-eslint/no-unused-vars': [
344
+ 'error',
345
+ {
346
+ vars: 'all',
347
+ args: 'after-used',
348
+ caughtErrors: 'none',
349
+ ignoreRestSiblings: false,
350
+ ignoreClassWithStaticInitBlock: false,
351
+ ignoreUsingDeclarations: false,
352
+ reportUsedIgnorePattern: false,
353
+ },
354
+ ],
355
+
356
+ // https://typescript-eslint.io/rules/no-use-before-define
357
+ 'no-use-before-define': 'off',
358
+ '@typescript-eslint/no-use-before-define': [
359
+ 'error',
360
+ {
361
+ functions: true,
362
+ classes: true,
363
+ variables: true,
364
+ allowNamedExports: false,
365
+
366
+ // typescript only
367
+ enums: true,
368
+ typedefs: true,
369
+ ignoreTypeReferences: true,
370
+ },
371
+ ],
372
+
373
+ // https://typescript-eslint.io/rules/no-useless-constructor
374
+ 'no-useless-constructor': 'off',
375
+ '@typescript-eslint/no-useless-constructor': 'error',
376
+
377
+ // https://typescript-eslint.io/rules/no-useless-default-assignment
378
+ // requires type information
379
+ '@typescript-eslint/no-useless-default-assignment': 'off',
380
+
381
+ // https://typescript-eslint.io/rules/no-useless-empty-export
382
+ '@typescript-eslint/no-useless-empty-export': 'error',
383
+
384
+ // https://typescript-eslint.io/rules/no-var-requires
385
+ '@typescript-eslint/no-var-requires': 'off', // deprecated
386
+
387
+ // https://typescript-eslint.io/rules/no-wrapper-object-types
388
+ '@typescript-eslint/no-wrapper-object-types': 'error',
389
+
390
+ // https://typescript-eslint.io/rules/non-nullable-type-assertion-style
391
+ // requires type information
392
+ '@typescript-eslint/non-nullable-type-assertion-style': 'off',
393
+
394
+ // https://typescript-eslint.io/rules/only-throw-error
395
+ // requires type information
396
+ // 'no-throw-literal': 'off',
397
+ '@typescript-eslint/only-throw-error': 'off',
398
+
399
+ // https://typescript-eslint.io/rules/parameter-properties
400
+ '@typescript-eslint/parameter-properties': 'off',
401
+
402
+ // https://typescript-eslint.io/rules/prefer-as-const
403
+ '@typescript-eslint/prefer-as-const': 'error',
404
+
405
+ // https://typescript-eslint.io/rules/prefer-destructuring
406
+ // requires type information
407
+ // 'prefer-destructuring': 'off',
408
+ '@typescript-eslint/prefer-destructuring': 'off',
409
+
410
+ // https://typescript-eslint.io/rules/prefer-enum-initializers
411
+ '@typescript-eslint/prefer-enum-initializers': 'off',
412
+
413
+ // https://typescript-eslint.io/rules/prefer-find
414
+ // requires type information
415
+ '@typescript-eslint/prefer-find': 'off',
416
+
417
+ // https://typescript-eslint.io/rules/prefer-for-of
418
+ '@typescript-eslint/prefer-for-of': 'error',
419
+
420
+ // https://typescript-eslint.io/rules/prefer-function-type
421
+ '@typescript-eslint/prefer-function-type': 'error',
422
+
423
+ // https://typescript-eslint.io/rules/prefer-includes
424
+ // requires type information
425
+ '@typescript-eslint/prefer-includes': 'off',
426
+
427
+ // https://typescript-eslint.io/rules/prefer-literal-enum-member
428
+ '@typescript-eslint/prefer-literal-enum-member': 'error',
429
+
430
+ // https://typescript-eslint.io/rules/prefer-namespace-keyword
431
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
432
+
433
+ // https://typescript-eslint.io/rules/prefer-nullish-coalescing
434
+ // requires type information
435
+ '@typescript-eslint/prefer-nullish-coalescing': 'off',
436
+
437
+ // https://typescript-eslint.io/rules/prefer-optional-chain
438
+ // requires type information
439
+ '@typescript-eslint/prefer-optional-chain': 'off',
440
+
441
+ // https://typescript-eslint.io/rules/prefer-promise-reject-errors
442
+ // requires type information
443
+ // 'prefer-promise-reject-errors': 'off',
444
+ '@typescript-eslint/prefer-promise-reject-errors': 'off',
445
+
446
+ // https://typescript-eslint.io/rules/prefer-readonly
447
+ // requires type information
448
+ '@typescript-eslint/prefer-readonly': 'off',
449
+
450
+ // https://typescript-eslint.io/rules/prefer-readonly-parameter-types
451
+ // requires type information
452
+ '@typescript-eslint/prefer-readonly-parameter-types': 'off',
453
+
454
+ // https://typescript-eslint.io/rules/prefer-reduce-type-parameter
455
+ // requires type information
456
+ '@typescript-eslint/prefer-reduce-type-parameter': 'off',
457
+
458
+ // https://typescript-eslint.io/rules/prefer-regexp-exec
459
+ // requires type information
460
+ '@typescript-eslint/prefer-regexp-exec': 'off',
461
+
462
+ // https://typescript-eslint.io/rules/prefer-return-this-type
463
+ // requires type information
464
+ '@typescript-eslint/prefer-return-this-type': 'off',
465
+
466
+ // https://typescript-eslint.io/rules/prefer-string-starts-ends-with
467
+ // requires type information
468
+ '@typescript-eslint/prefer-string-starts-ends-with': 'off',
469
+
470
+ // https://typescript-eslint.io/rules/prefer-ts-expect-error
471
+ '@typescript-eslint/prefer-ts-expect-error': 'off', // deprecated
472
+
473
+ // https://typescript-eslint.io/rules/promise-function-async
474
+ // requires type information
475
+ '@typescript-eslint/promise-function-async': 'off',
476
+
477
+ // https://typescript-eslint.io/rules/related-getter-setter-pairs
478
+ // requires type information
479
+ '@typescript-eslint/related-getter-setter-pairs': 'off',
480
+
481
+ // https://typescript-eslint.io/rules/require-array-sort-compare
482
+ // requires type information
483
+ '@typescript-eslint/require-array-sort-compare': 'off',
484
+
485
+ // https://typescript-eslint.io/rules/require-await
486
+ // requires type information
487
+ // 'require-await': 'off',
488
+ '@typescript-eslint/require-await': 'off',
489
+
490
+ // https://typescript-eslint.io/rules/restrict-plus-operands
491
+ // requires type information
492
+ '@typescript-eslint/restrict-plus-operands': 'off',
493
+
494
+ // https://typescript-eslint.io/rules/restrict-template-expressions
495
+ // requires type information
496
+ '@typescript-eslint/restrict-template-expressions': 'off',
497
+
498
+ // https://typescript-eslint.io/rules/return-await
499
+ // requires type information
500
+ // 'no-return-await': 'off',
501
+ '@typescript-eslint/return-await': 'off',
502
+
503
+ // https://typescript-eslint.io/rules/sort-type-constituents
504
+ '@typescript-eslint/sort-type-constituents': 'off', // deprecated
505
+
506
+ // https://typescript-eslint.io/rules/strict-boolean-expressions
507
+ // requires type information
508
+ '@typescript-eslint/strict-boolean-expressions': 'off',
509
+
510
+ // https://typescript-eslint.io/rules/switch-exhaustiveness-check
511
+ // requires type information
512
+ '@typescript-eslint/switch-exhaustiveness-check': 'off',
513
+
514
+ // https://typescript-eslint.io/rules/triple-slash-reference
515
+ '@typescript-eslint/triple-slash-reference': 'error',
516
+
517
+ // https://typescript-eslint.io/rules/typedef
518
+ '@typescript-eslint/typedef': 'off', // deprecated
519
+
520
+ // https://typescript-eslint.io/rules/unbound-method
521
+ // requires type information
522
+ '@typescript-eslint/unbound-method': 'off',
523
+
524
+ // https://typescript-eslint.io/rules/unified-signatures
525
+ '@typescript-eslint/unified-signatures': 'error',
526
+
527
+ // https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable
528
+ // requires type information
529
+ '@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
530
+ };
531
+ };
532
+
533
+ export default getTypescriptPluginRules;