@perfective/eslint-config 0.29.2 → 0.30.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.
Files changed (77) hide show
  1. package/LICENSE +1 -1
  2. package/README.adoc +24 -18
  3. package/README.md +20 -16
  4. package/config/node.d.ts +7 -0
  5. package/config/node.js +7 -11
  6. package/config/plugin.d.ts +9 -0
  7. package/config/plugin.js +22 -26
  8. package/config.js +1 -6
  9. package/cypress.d.ts +5 -0
  10. package/cypress.js +31 -56
  11. package/index.d.ts +46 -12
  12. package/index.js +100 -144
  13. package/jest-dom.js +8 -11
  14. package/jest.d.ts +6 -0
  15. package/jest.js +29 -24
  16. package/package.json +18 -17
  17. package/rules/array-func/index.d.ts +1 -2
  18. package/rules/array-func/index.js +14 -50
  19. package/rules/cypress/index.d.ts +11 -3
  20. package/rules/cypress/index.js +23 -57
  21. package/rules/eslint/index.js +6 -9
  22. package/rules/eslint/layout-formatting.js +64 -67
  23. package/rules/eslint/possible-problems.js +96 -99
  24. package/rules/eslint/suggestions.js +181 -182
  25. package/rules/eslint-comments/best-practices.js +8 -11
  26. package/rules/eslint-comments/index.d.ts +1 -2
  27. package/rules/eslint-comments/index.js +9 -45
  28. package/rules/eslint-comments/stylistic-issues.js +9 -18
  29. package/rules/import/helpful-warnings.js +11 -14
  30. package/rules/import/index.js +11 -14
  31. package/rules/import/module-systems.js +10 -13
  32. package/rules/import/rules/no-extraneous-dependencies.d.ts +3 -0
  33. package/rules/import/rules/no-extraneous-dependencies.js +20 -21
  34. package/rules/import/static-analysis.js +26 -29
  35. package/rules/import/style-guide.js +33 -36
  36. package/rules/jest/index.js +98 -72
  37. package/rules/jest/typescript-eslint.js +5 -8
  38. package/rules/jest-dom/index.js +19 -55
  39. package/rules/jsdoc/index.d.ts +1 -1
  40. package/rules/jsdoc/index.js +158 -344
  41. package/rules/n/index.d.ts +1 -1
  42. package/rules/n/index.js +64 -98
  43. package/rules/prefer-arrow/index.d.ts +1 -2
  44. package/rules/prefer-arrow/index.js +14 -50
  45. package/rules/promise/index.d.ts +1 -2
  46. package/rules/promise/index.js +35 -73
  47. package/rules/rxjs/index.d.ts +1 -1
  48. package/rules/rxjs/index.js +60 -96
  49. package/rules/security/index.d.ts +1 -2
  50. package/rules/security/index.js +22 -58
  51. package/rules/simple-import-sort/index.js +12 -48
  52. package/rules/simple-import-sort/rules/imports.d.ts +11 -0
  53. package/rules/simple-import-sort/rules/imports.js +18 -32
  54. package/rules/stylistic/js/index.d.ts +9 -2
  55. package/rules/stylistic/js/index.js +198 -236
  56. package/rules/stylistic/jsx/index.d.ts +8 -2
  57. package/rules/stylistic/jsx/index.js +81 -117
  58. package/rules/stylistic/plus/index.d.ts +6 -2
  59. package/rules/stylistic/plus/index.js +14 -50
  60. package/rules/stylistic/ts/index.d.ts +8 -2
  61. package/rules/stylistic/ts/index.js +135 -169
  62. package/rules/testing-library/index.js +41 -77
  63. package/rules/typescript-eslint/extension-rules.js +113 -116
  64. package/rules/typescript-eslint/index.d.ts +2 -0
  65. package/rules/typescript-eslint/index.js +9 -45
  66. package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.d.ts +5 -0
  67. package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.js +24 -30
  68. package/rules/typescript-eslint/supported-rules.d.ts +2 -0
  69. package/rules/typescript-eslint/supported-rules.js +256 -319
  70. package/rules/unicorn/index.d.ts +7 -2
  71. package/rules/unicorn/index.js +178 -209
  72. package/rules/unicorn/rules/prevent-abbreviations.d.ts +8 -0
  73. package/rules/unicorn/rules/prevent-abbreviations.js +30 -8
  74. package/rules.js +4 -14
  75. package/rxjs.d.ts +5 -0
  76. package/rxjs.js +21 -57
  77. package/testing-library.js +8 -11
@@ -1,319 +1,256 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.supportedRules = void 0;
4
- const typescript_eslint_naming_convention_1 = require("./rules/typescript-eslint-naming-convention");
5
- exports.supportedRules = {
6
- '@typescript-eslint/adjacent-overload-signatures': 'error',
7
- '@typescript-eslint/array-type': ['warn', {
8
- default: 'array',
9
- readonly: 'array',
10
- }],
11
- '@typescript-eslint/await-thenable': 'error',
12
- '@typescript-eslint/ban-ts-comment': 'error',
13
- '@typescript-eslint/ban-tslint-comment': 'warn',
14
- '@typescript-eslint/ban-types': 'off',
15
- '@typescript-eslint/class-literal-property-style': 'off',
16
- '@typescript-eslint/consistent-generic-constructors': ['warn', 'type-annotation'],
17
- '@typescript-eslint/consistent-indexed-object-style': ['warn', 'record'],
18
- '@typescript-eslint/consistent-type-assertions': ['error', {
19
- assertionStyle: 'as',
20
- objectLiteralTypeAssertions: 'allow',
21
- }],
22
- '@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
23
- '@typescript-eslint/consistent-type-exports': ['off', {
24
- fixMixedExportsWithInlineTypeSpecifier: true,
25
- }],
26
- '@typescript-eslint/consistent-type-imports': ['warn', {
27
- prefer: 'no-type-imports',
28
- disallowTypeAnnotations: true,
29
- }],
30
- '@typescript-eslint/explicit-function-return-type': ['error', {
31
- allowConciseArrowFunctionExpressionsStartingWithVoid: true,
32
- allowDirectConstAssertionInArrowFunctions: true,
33
- allowExpressions: false,
34
- allowFunctionsWithoutTypeParameters: false,
35
- allowHigherOrderFunctions: true,
36
- allowIIFEs: false,
37
- allowTypedFunctionExpressions: true,
38
- allowedNames: [],
39
- }],
40
- '@typescript-eslint/explicit-member-accessibility': 'warn',
41
- '@typescript-eslint/explicit-module-boundary-types': 'error',
42
- '@typescript-eslint/member-delimiter-style': 'off',
43
- '@typescript-eslint/member-ordering': ['error', {
44
- default: [
45
- 'signature',
46
- 'call-signature',
47
- 'public-static-field',
48
- 'public-abstract-field',
49
- 'public-decorated-field',
50
- 'public-instance-field',
51
- 'protected-static-field',
52
- 'protected-abstract-field',
53
- 'protected-decorated-field',
54
- 'protected-instance-field',
55
- 'private-static-field',
56
- '#private-static-field',
57
- 'private-decorated-field',
58
- 'private-instance-field',
59
- '#private-instance-field',
60
- 'field',
61
- 'static-initialization',
62
- 'constructor',
63
- 'public-static-method',
64
- 'public-static-set',
65
- 'public-static-get',
66
- 'public-abstract-method',
67
- 'public-abstract-set',
68
- 'public-abstract-get',
69
- 'public-decorated-method',
70
- 'public-decorated-set',
71
- 'public-decorated-get',
72
- 'public-instance-method',
73
- 'public-instance-set',
74
- 'public-instance-get',
75
- 'protected-static-method',
76
- 'protected-static-set',
77
- 'protected-static-get',
78
- 'protected-abstract-method',
79
- 'protected-abstract-set',
80
- 'protected-abstract-get',
81
- 'protected-decorated-method',
82
- 'protected-decorated-set',
83
- 'protected-decorated-get',
84
- 'protected-instance-method',
85
- 'protected-instance-set',
86
- 'protected-instance-get',
87
- 'private-static-method',
88
- '#private-static-method',
89
- 'private-static-set',
90
- 'private-static-get',
91
- '#private-static-set',
92
- '#private-static-get',
93
- 'private-decorated-method',
94
- 'private-decorated-set',
95
- 'private-decorated-get',
96
- 'private-instance-method',
97
- '#private-instance-method',
98
- 'private-instance-set',
99
- 'private-instance-get',
100
- '#private-instance-set',
101
- '#private-instance-get',
102
- 'method',
103
- ],
104
- }],
105
- '@typescript-eslint/method-signature-style': ['warn', 'property'],
106
- '@typescript-eslint/naming-convention': ['error', ...(0, typescript_eslint_naming_convention_1.typescriptEslintNamingConvention)()],
107
- '@typescript-eslint/no-array-delete': 'error',
108
- '@typescript-eslint/no-base-to-string': 'error',
109
- '@typescript-eslint/no-confusing-non-null-assertion': 'warn',
110
- '@typescript-eslint/no-confusing-void-expression': ['warn', {
111
- ignoreArrowShorthand: true,
112
- ignoreVoidOperator: false,
113
- }],
114
- '@typescript-eslint/no-deprecated': 'error',
115
- '@typescript-eslint/no-duplicate-enum-values': 'error',
116
- '@typescript-eslint/no-duplicate-type-constituents': ['error', {
117
- ignoreIntersections: false,
118
- ignoreUnions: false,
119
- }],
120
- '@typescript-eslint/no-dynamic-delete': 'warn',
121
- '@typescript-eslint/no-empty-interface': ['off', {
122
- allowSingleExtends: true,
123
- }],
124
- '@typescript-eslint/no-empty-object-type': ['error', {
125
- allowInterfaces: 'always',
126
- allowObjectTypes: 'never',
127
- }],
128
- '@typescript-eslint/no-explicit-any': ['error', {
129
- fixToUnknown: false,
130
- ignoreRestArgs: false,
131
- }],
132
- '@typescript-eslint/no-extra-non-null-assertion': 'warn',
133
- '@typescript-eslint/no-extraneous-class': ['error', {
134
- allowConstructorOnly: false,
135
- allowEmpty: false,
136
- allowStaticOnly: false,
137
- allowWithDecorator: true,
138
- }],
139
- '@typescript-eslint/no-floating-promises': ['error', {
140
- allowForKnownSafeCalls: [],
141
- allowForKnownSafePromises: [],
142
- checkThenables: true,
143
- ignoreIIFE: false,
144
- ignoreVoid: true,
145
- }],
146
- '@typescript-eslint/no-for-in-array': 'error',
147
- '@typescript-eslint/no-import-type-side-effects': 'warn',
148
- '@typescript-eslint/no-inferrable-types': 'off',
149
- '@typescript-eslint/no-invalid-void-type': ['error', {
150
- allowInGenericTypeArguments: true,
151
- }],
152
- '@typescript-eslint/no-meaningless-void-operator': ['warn', {
153
- checkNever: true,
154
- }],
155
- '@typescript-eslint/no-misused-new': 'error',
156
- '@typescript-eslint/no-misused-promises': ['error', {
157
- checksConditionals: true,
158
- checksVoidReturn: true,
159
- }],
160
- '@typescript-eslint/no-mixed-enums': 'error',
161
- '@typescript-eslint/no-namespace': 'error',
162
- '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
163
- '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
164
- '@typescript-eslint/no-non-null-assertion': 'error',
165
- '@typescript-eslint/no-redundant-type-constituents': 'error',
166
- '@typescript-eslint/no-unnecessary-type-parameters': 'error',
167
- '@typescript-eslint/no-require-imports': ['error', {
168
- allow: [],
169
- }],
170
- '@typescript-eslint/no-restricted-types': ['error', {
171
- types: {
172
- object: {
173
- message: [
174
- 'The `object` type is currently hard to use',
175
- '(https://github.com/microsoft/TypeScript/issues/21732).',
176
- ].join(' '),
177
- suggest: ['Record<string, unknown>'],
178
- },
179
- },
180
- }],
181
- '@typescript-eslint/no-this-alias': 'error',
182
- '@typescript-eslint/no-type-alias': 'off',
183
- '@typescript-eslint/no-unnecessary-boolean-literal-compare': ['warn', {
184
- allowComparingNullableBooleansToTrue: true,
185
- allowComparingNullableBooleansToFalse: true,
186
- }],
187
- '@typescript-eslint/no-unnecessary-condition': ['warn', {
188
- allowConstantLoopConditions: false,
189
- allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
190
- checkTypePredicates: true,
191
- }],
192
- '@typescript-eslint/no-unnecessary-parameter-property-assignment': 'error',
193
- '@typescript-eslint/no-unnecessary-qualifier': 'warn',
194
- '@typescript-eslint/no-unnecessary-template-expression': 'error',
195
- '@typescript-eslint/no-unnecessary-type-arguments': 'warn',
196
- '@typescript-eslint/no-unnecessary-type-assertion': 'warn',
197
- '@typescript-eslint/no-unnecessary-type-constraint': 'warn',
198
- '@typescript-eslint/no-unsafe-argument': 'error',
199
- '@typescript-eslint/no-unsafe-assignment': 'error',
200
- '@typescript-eslint/no-unsafe-call': 'error',
201
- '@typescript-eslint/no-unsafe-declaration-merging': 'error',
202
- '@typescript-eslint/no-unsafe-enum-comparison': 'error',
203
- '@typescript-eslint/no-unsafe-function-type': 'warn',
204
- '@typescript-eslint/no-unsafe-member-access': 'error',
205
- '@typescript-eslint/no-unsafe-return': 'error',
206
- '@typescript-eslint/no-unsafe-type-assertion': 'off',
207
- '@typescript-eslint/no-unsafe-unary-minus': 'error',
208
- '@typescript-eslint/no-useless-empty-export': 'warn',
209
- '@typescript-eslint/no-useless-template-literal': 'off',
210
- '@typescript-eslint/no-var-requires': ['error', {
211
- allow: [],
212
- }],
213
- '@typescript-eslint/no-wrapper-object-types': 'warn',
214
- '@typescript-eslint/non-nullable-type-assertion-style': 'error',
215
- '@typescript-eslint/parameter-properties': ['error', {
216
- prefer: 'parameter-property',
217
- }],
218
- '@typescript-eslint/prefer-as-const': 'warn',
219
- '@typescript-eslint/prefer-enum-initializers': 'error',
220
- '@typescript-eslint/prefer-find': 'error',
221
- '@typescript-eslint/prefer-for-of': 'error',
222
- '@typescript-eslint/prefer-function-type': 'warn',
223
- '@typescript-eslint/prefer-includes': 'warn',
224
- '@typescript-eslint/prefer-literal-enum-member': ['error', {
225
- allowBitwiseExpressions: true,
226
- }],
227
- '@typescript-eslint/prefer-namespace-keyword': 'warn',
228
- '@typescript-eslint/prefer-nullish-coalescing': ['error', {
229
- ignoreBooleanCoercion: false,
230
- ignoreTernaryTests: false,
231
- ignoreConditionalTests: true,
232
- ignoreMixedLogicalExpressions: true,
233
- ignorePrimitives: {
234
- bigint: false,
235
- boolean: false,
236
- number: false,
237
- string: false,
238
- },
239
- }],
240
- '@typescript-eslint/prefer-optional-chain': ['error', {
241
- checkAny: true,
242
- checkUnknown: true,
243
- checkString: true,
244
- checkNumber: true,
245
- checkBoolean: true,
246
- checkBigInt: true,
247
- requireNullish: false,
248
- }],
249
- '@typescript-eslint/prefer-readonly': 'warn',
250
- '@typescript-eslint/prefer-readonly-parameter-types': 'off',
251
- '@typescript-eslint/prefer-reduce-type-parameter': 'warn',
252
- '@typescript-eslint/prefer-regexp-exec': 'warn',
253
- '@typescript-eslint/prefer-return-this-type': 'warn',
254
- '@typescript-eslint/prefer-string-starts-ends-with': ['warn', {
255
- allowSingleElementEquality: 'never',
256
- }],
257
- '@typescript-eslint/prefer-ts-expect-error': 'off',
258
- '@typescript-eslint/promise-function-async': ['warn', {
259
- checkArrowFunctions: false,
260
- }],
261
- '@typescript-eslint/require-array-sort-compare': ['error', {
262
- ignoreStringArrays: true,
263
- }],
264
- '@typescript-eslint/restrict-plus-operands': ['error', {
265
- allowAny: false,
266
- allowBoolean: false,
267
- allowNullish: false,
268
- allowNumberAndString: false,
269
- allowRegExp: false,
270
- skipCompoundAssignments: false,
271
- }],
272
- '@typescript-eslint/restrict-template-expressions': ['error', {
273
- allowAny: false,
274
- allowArray: false,
275
- allowBoolean: false,
276
- allowNullish: false,
277
- allowNumber: false,
278
- allowRegExp: false,
279
- allowNever: false,
280
- }],
281
- '@typescript-eslint/sort-type-constituents': 'off',
282
- '@typescript-eslint/strict-boolean-expressions': ['error', {
283
- allowString: false,
284
- allowNumber: false,
285
- allowNullableEnum: false,
286
- allowNullableObject: true,
287
- allowNullableBoolean: false,
288
- allowNullableString: false,
289
- allowNullableNumber: false,
290
- allowAny: false,
291
- }],
292
- '@typescript-eslint/switch-exhaustiveness-check': ['error', {
293
- allowDefaultCaseForExhaustiveSwitch: false,
294
- requireDefaultForNonUnion: true,
295
- }],
296
- '@typescript-eslint/triple-slash-reference': ['error', {
297
- path: 'never',
298
- types: 'always',
299
- lib: 'never',
300
- }],
301
- '@typescript-eslint/type-annotation-spacing': 'off',
302
- '@typescript-eslint/typedef': ['error', {
303
- arrayDestructuring: false,
304
- arrowParameter: false,
305
- memberVariableDeclaration: true,
306
- objectDestructuring: false,
307
- parameter: true,
308
- propertyDeclaration: true,
309
- variableDeclaration: false,
310
- variableDeclarationIgnoreFunction: false,
311
- }],
312
- '@typescript-eslint/unbound-method': ['error', {
313
- ignoreStatic: false,
314
- }],
315
- '@typescript-eslint/unified-signatures': ['error', {
316
- ignoreDifferentlyNamedParameters: true,
317
- }],
318
- '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
319
- };
1
+ import { typescriptEslintNamingConvention } from "./rules/typescript-eslint-naming-convention.js";
2
+ export const supportedRules = {
3
+ '@typescript-eslint/adjacent-overload-signatures': 'error',
4
+ '@typescript-eslint/array-type': ['warn', {
5
+ default: 'array',
6
+ readonly: 'array'
7
+ }],
8
+ '@typescript-eslint/await-thenable': 'error',
9
+ '@typescript-eslint/ban-ts-comment': 'error',
10
+ '@typescript-eslint/ban-tslint-comment': 'warn',
11
+ '@typescript-eslint/ban-types': 'off',
12
+ '@typescript-eslint/class-literal-property-style': 'off',
13
+ '@typescript-eslint/consistent-generic-constructors': ['warn', 'type-annotation'],
14
+ '@typescript-eslint/consistent-indexed-object-style': ['warn', 'record'],
15
+ '@typescript-eslint/consistent-type-assertions': ['error', {
16
+ assertionStyle: 'as',
17
+ arrayLiteralTypeAssertions: 'allow-as-parameter',
18
+ objectLiteralTypeAssertions: 'allow'
19
+ }],
20
+ '@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
21
+ '@typescript-eslint/consistent-type-exports': ['off', {
22
+ fixMixedExportsWithInlineTypeSpecifier: true
23
+ }],
24
+ '@typescript-eslint/consistent-type-imports': ['warn', {
25
+ prefer: 'no-type-imports',
26
+ disallowTypeAnnotations: true
27
+ }],
28
+ '@typescript-eslint/explicit-function-return-type': ['error', {
29
+ allowConciseArrowFunctionExpressionsStartingWithVoid: true,
30
+ allowDirectConstAssertionInArrowFunctions: true,
31
+ allowExpressions: false,
32
+ allowFunctionsWithoutTypeParameters: false,
33
+ allowHigherOrderFunctions: true,
34
+ allowIIFEs: false,
35
+ allowTypedFunctionExpressions: true,
36
+ allowedNames: []
37
+ }],
38
+ '@typescript-eslint/explicit-member-accessibility': 'warn',
39
+ '@typescript-eslint/explicit-module-boundary-types': 'error',
40
+ '@typescript-eslint/member-delimiter-style': 'off',
41
+ '@typescript-eslint/member-ordering': ['error', {
42
+ default: ['signature', 'call-signature', 'public-static-field', 'public-abstract-field', 'public-decorated-field', 'public-instance-field', 'protected-static-field', 'protected-abstract-field', 'protected-decorated-field', 'protected-instance-field', 'private-static-field', '#private-static-field', 'private-decorated-field', 'private-instance-field', '#private-instance-field', 'field', 'static-initialization', 'constructor', 'public-static-method', 'public-static-set', 'public-static-get', 'public-abstract-method', 'public-abstract-set', 'public-abstract-get', 'public-decorated-method', 'public-decorated-set', 'public-decorated-get', 'public-instance-method', 'public-instance-set', 'public-instance-get', 'protected-static-method', 'protected-static-set', 'protected-static-get', 'protected-abstract-method', 'protected-abstract-set', 'protected-abstract-get', 'protected-decorated-method', 'protected-decorated-set', 'protected-decorated-get', 'protected-instance-method', 'protected-instance-set', 'protected-instance-get', 'private-static-method', '#private-static-method', 'private-static-set', 'private-static-get', '#private-static-set', '#private-static-get', 'private-decorated-method', 'private-decorated-set', 'private-decorated-get', 'private-instance-method', '#private-instance-method', 'private-instance-set', 'private-instance-get', '#private-instance-set', '#private-instance-get', 'method']
43
+ }],
44
+ '@typescript-eslint/method-signature-style': ['warn', 'property'],
45
+ '@typescript-eslint/naming-convention': ['error', ...typescriptEslintNamingConvention()],
46
+ '@typescript-eslint/no-array-delete': 'error',
47
+ '@typescript-eslint/no-base-to-string': 'error',
48
+ '@typescript-eslint/no-confusing-non-null-assertion': 'warn',
49
+ '@typescript-eslint/no-confusing-void-expression': ['warn', {
50
+ ignoreArrowShorthand: true,
51
+ ignoreVoidOperator: false
52
+ }],
53
+ '@typescript-eslint/no-deprecated': 'error',
54
+ '@typescript-eslint/no-duplicate-enum-values': 'error',
55
+ '@typescript-eslint/no-duplicate-type-constituents': ['error', {
56
+ ignoreIntersections: false,
57
+ ignoreUnions: false
58
+ }],
59
+ '@typescript-eslint/no-dynamic-delete': 'warn',
60
+ '@typescript-eslint/no-empty-interface': ['off', {
61
+ allowSingleExtends: true
62
+ }],
63
+ '@typescript-eslint/no-empty-object-type': ['error', {
64
+ allowInterfaces: 'always',
65
+ allowObjectTypes: 'never'
66
+ }],
67
+ '@typescript-eslint/no-explicit-any': ['error', {
68
+ fixToUnknown: false,
69
+ ignoreRestArgs: false
70
+ }],
71
+ '@typescript-eslint/no-extra-non-null-assertion': 'warn',
72
+ '@typescript-eslint/no-extraneous-class': ['error', {
73
+ allowConstructorOnly: false,
74
+ allowEmpty: false,
75
+ allowStaticOnly: false,
76
+ allowWithDecorator: true
77
+ }],
78
+ '@typescript-eslint/no-floating-promises': ['error', {
79
+ allowForKnownSafeCalls: [],
80
+ allowForKnownSafePromises: [],
81
+ checkThenables: true,
82
+ ignoreIIFE: false,
83
+ ignoreVoid: true
84
+ }],
85
+ '@typescript-eslint/no-for-in-array': 'error',
86
+ '@typescript-eslint/no-import-type-side-effects': 'warn',
87
+ '@typescript-eslint/no-inferrable-types': 'off',
88
+ '@typescript-eslint/no-invalid-void-type': ['error', {
89
+ allowInGenericTypeArguments: true
90
+ }],
91
+ '@typescript-eslint/no-meaningless-void-operator': ['warn', {
92
+ checkNever: true
93
+ }],
94
+ '@typescript-eslint/no-misused-new': 'error',
95
+ '@typescript-eslint/no-misused-promises': ['error', {
96
+ checksConditionals: true,
97
+ checksVoidReturn: true
98
+ }],
99
+ '@typescript-eslint/no-misused-spread': 'error',
100
+ '@typescript-eslint/no-mixed-enums': 'error',
101
+ '@typescript-eslint/no-namespace': 'error',
102
+ '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
103
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
104
+ '@typescript-eslint/no-non-null-assertion': 'error',
105
+ '@typescript-eslint/no-redundant-type-constituents': 'error',
106
+ '@typescript-eslint/no-unnecessary-type-parameters': 'error',
107
+ '@typescript-eslint/no-require-imports': ['error', {
108
+ allow: []
109
+ }],
110
+ '@typescript-eslint/no-restricted-types': ['error', {
111
+ types: {
112
+ object: {
113
+ message: ['The `object` type is currently hard to use', '(https://github.com/microsoft/TypeScript/issues/21732).'].join(' '),
114
+ suggest: ['Record<string, unknown>']
115
+ }
116
+ }
117
+ }],
118
+ '@typescript-eslint/no-this-alias': 'error',
119
+ '@typescript-eslint/no-type-alias': 'off',
120
+ '@typescript-eslint/no-unnecessary-boolean-literal-compare': ['warn', {
121
+ allowComparingNullableBooleansToTrue: true,
122
+ allowComparingNullableBooleansToFalse: true
123
+ }],
124
+ '@typescript-eslint/no-unnecessary-condition': ['warn', {
125
+ allowConstantLoopConditions: false,
126
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
127
+ checkTypePredicates: true
128
+ }],
129
+ '@typescript-eslint/no-unnecessary-parameter-property-assignment': 'error',
130
+ '@typescript-eslint/no-unnecessary-qualifier': 'warn',
131
+ '@typescript-eslint/no-unnecessary-template-expression': 'error',
132
+ '@typescript-eslint/no-unnecessary-type-arguments': 'warn',
133
+ '@typescript-eslint/no-unnecessary-type-assertion': 'warn',
134
+ '@typescript-eslint/no-unnecessary-type-constraint': 'warn',
135
+ '@typescript-eslint/no-unsafe-argument': 'error',
136
+ '@typescript-eslint/no-unsafe-assignment': 'error',
137
+ '@typescript-eslint/no-unsafe-call': 'error',
138
+ '@typescript-eslint/no-unsafe-declaration-merging': 'error',
139
+ '@typescript-eslint/no-unsafe-enum-comparison': 'error',
140
+ '@typescript-eslint/no-unsafe-function-type': 'warn',
141
+ '@typescript-eslint/no-unsafe-member-access': 'error',
142
+ '@typescript-eslint/no-unsafe-return': 'error',
143
+ '@typescript-eslint/no-unsafe-type-assertion': 'off',
144
+ '@typescript-eslint/no-unsafe-unary-minus': 'error',
145
+ '@typescript-eslint/no-useless-empty-export': 'warn',
146
+ '@typescript-eslint/no-useless-template-literal': 'off',
147
+ '@typescript-eslint/no-var-requires': ['error', {
148
+ allow: []
149
+ }],
150
+ '@typescript-eslint/no-wrapper-object-types': 'warn',
151
+ '@typescript-eslint/non-nullable-type-assertion-style': 'error',
152
+ '@typescript-eslint/parameter-properties': ['error', {
153
+ prefer: 'parameter-property'
154
+ }],
155
+ '@typescript-eslint/prefer-as-const': 'warn',
156
+ '@typescript-eslint/prefer-enum-initializers': 'error',
157
+ '@typescript-eslint/prefer-find': 'error',
158
+ '@typescript-eslint/prefer-for-of': 'error',
159
+ '@typescript-eslint/prefer-function-type': 'warn',
160
+ '@typescript-eslint/prefer-includes': 'warn',
161
+ '@typescript-eslint/prefer-literal-enum-member': ['error', {
162
+ allowBitwiseExpressions: true
163
+ }],
164
+ '@typescript-eslint/prefer-namespace-keyword': 'warn',
165
+ '@typescript-eslint/prefer-nullish-coalescing': ['error', {
166
+ ignoreBooleanCoercion: false,
167
+ ignoreTernaryTests: false,
168
+ ignoreConditionalTests: true,
169
+ ignoreMixedLogicalExpressions: true,
170
+ ignorePrimitives: {
171
+ bigint: false,
172
+ boolean: false,
173
+ number: false,
174
+ string: false
175
+ }
176
+ }],
177
+ '@typescript-eslint/prefer-optional-chain': ['error', {
178
+ checkAny: true,
179
+ checkUnknown: true,
180
+ checkString: true,
181
+ checkNumber: true,
182
+ checkBoolean: true,
183
+ checkBigInt: true,
184
+ requireNullish: false
185
+ }],
186
+ '@typescript-eslint/prefer-readonly': 'warn',
187
+ '@typescript-eslint/prefer-readonly-parameter-types': 'off',
188
+ '@typescript-eslint/prefer-reduce-type-parameter': 'warn',
189
+ '@typescript-eslint/prefer-regexp-exec': 'warn',
190
+ '@typescript-eslint/prefer-return-this-type': 'warn',
191
+ '@typescript-eslint/prefer-string-starts-ends-with': ['warn', {
192
+ allowSingleElementEquality: 'never'
193
+ }],
194
+ '@typescript-eslint/prefer-ts-expect-error': 'off',
195
+ '@typescript-eslint/promise-function-async': ['warn', {
196
+ checkArrowFunctions: false
197
+ }],
198
+ '@typescript-eslint/require-array-sort-compare': ['error', {
199
+ ignoreStringArrays: true
200
+ }],
201
+ '@typescript-eslint/restrict-plus-operands': ['error', {
202
+ allowAny: false,
203
+ allowBoolean: false,
204
+ allowNullish: false,
205
+ allowNumberAndString: false,
206
+ allowRegExp: false,
207
+ skipCompoundAssignments: false
208
+ }],
209
+ '@typescript-eslint/restrict-template-expressions': ['error', {
210
+ allowAny: false,
211
+ allowArray: false,
212
+ allowBoolean: false,
213
+ allowNullish: false,
214
+ allowNumber: false,
215
+ allowRegExp: false,
216
+ allowNever: false
217
+ }],
218
+ '@typescript-eslint/sort-type-constituents': 'off',
219
+ '@typescript-eslint/strict-boolean-expressions': ['error', {
220
+ allowString: false,
221
+ allowNumber: false,
222
+ allowNullableEnum: false,
223
+ allowNullableObject: true,
224
+ allowNullableBoolean: false,
225
+ allowNullableString: false,
226
+ allowNullableNumber: false,
227
+ allowAny: false
228
+ }],
229
+ '@typescript-eslint/switch-exhaustiveness-check': ['error', {
230
+ allowDefaultCaseForExhaustiveSwitch: false,
231
+ requireDefaultForNonUnion: true
232
+ }],
233
+ '@typescript-eslint/triple-slash-reference': ['error', {
234
+ path: 'never',
235
+ types: 'always',
236
+ lib: 'never'
237
+ }],
238
+ '@typescript-eslint/type-annotation-spacing': 'off',
239
+ '@typescript-eslint/typedef': ['error', {
240
+ arrayDestructuring: false,
241
+ arrowParameter: false,
242
+ memberVariableDeclaration: true,
243
+ objectDestructuring: false,
244
+ parameter: true,
245
+ propertyDeclaration: true,
246
+ variableDeclaration: false,
247
+ variableDeclarationIgnoreFunction: false
248
+ }],
249
+ '@typescript-eslint/unbound-method': ['error', {
250
+ ignoreStatic: false
251
+ }],
252
+ '@typescript-eslint/unified-signatures': ['error', {
253
+ ignoreDifferentlyNamedParameters: true
254
+ }],
255
+ '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error'
256
+ };