-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathplugin.ts
More file actions
595 lines (593 loc) · 26.6 KB
/
Copy pathplugin.ts
File metadata and controls
595 lines (593 loc) · 26.6 KB
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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
import { createPlugin } from "@flint.fyi/core";
import accessorPairGroups from "./rules/accessorPairGroups.ts";
import accessorPairTypes from "./rules/accessorPairTypes.ts";
import accessorThisRecursion from "./rules/accessorThisRecursion.ts";
import anyArguments from "./rules/anyArguments.ts";
import anyAssignments from "./rules/anyAssignments.ts";
import anyCalls from "./rules/anyCalls.ts";
import anyMemberAccess from "./rules/anyMemberAccess.ts";
import anyReturns from "./rules/anyReturns.ts";
import argumentsRule from "./rules/arguments.ts";
import arrayCallbackReturns from "./rules/arrayCallbackReturns.ts";
import arrayConstructors from "./rules/arrayConstructors.ts";
import arrayDeleteUnnecessaryCounts from "./rules/arrayDeleteUnnecessaryCounts.ts";
import arrayElementDeletions from "./rules/arrayElementDeletions.ts";
import arrayEmptyCallbackSlots from "./rules/arrayEmptyCallbackSlots.ts";
import arrayExistenceChecksConsistency from "./rules/arrayExistenceChecksConsistency.ts";
import arrayFilteredFinds from "./rules/arrayFilteredFinds.ts";
import arrayFinds from "./rules/arrayFinds.ts";
import arrayFlatMapMethods from "./rules/arrayFlatMapMethods.ts";
import arrayFlatMethods from "./rules/arrayFlatMethods.ts";
import arrayFlatUnnecessaryDepths from "./rules/arrayFlatUnnecessaryDepths.ts";
import arrayIncludes from "./rules/arrayIncludes.ts";
import arrayIncludesMethods from "./rules/arrayIncludesMethods.ts";
import arrayIndexOfMethods from "./rules/arrayIndexOfMethods.ts";
import arrayLoops from "./rules/arrayLoops.ts";
import arrayMapIdentities from "./rules/arrayMapIdentities.ts";
import arrayMutableReverses from "./rules/arrayMutableReverses.ts";
import arrayMutableSorts from "./rules/arrayMutableSorts.ts";
import arrayReduceTypeArguments from "./rules/arrayReduceTypeArguments.ts";
import arraySliceUnnecessaryEnd from "./rules/arraySliceUnnecessaryEnd.ts";
import arraySomeMethods from "./rules/arraySomeMethods.ts";
import arrayTernarySpreadingConsistency from "./rules/arrayTernarySpreadingConsistency.ts";
import arrayTypes from "./rules/arrayTypes.ts";
import arrayUnnecessaryLengthChecks from "./rules/arrayUnnecessaryLengthChecks.ts";
import asConstAssertions from "./rules/asConstAssertions.ts";
import assignmentOperatorShorthands from "./rules/assignmentOperatorShorthands.ts";
import asyncPromiseExecutors from "./rules/asyncPromiseExecutors.ts";
import asyncUnnecessaryPromiseWrappers from "./rules/asyncUnnecessaryPromiseWrappers.ts";
import atAccesses from "./rules/atAccesses.ts";
import builtinCoercions from "./rules/builtinCoercions.ts";
import builtinConstructorNews from "./rules/builtinConstructorNews.ts";
import caseDeclarations from "./rules/caseDeclarations.ts";
import caseDuplicates from "./rules/caseDuplicates.ts";
import caseFallthroughs from "./rules/caseFallthroughs.ts";
import catchCallbackTypes from "./rules/catchCallbackTypes.ts";
import caughtVariableNames from "./rules/caughtVariableNames.ts";
import chainedAssignments from "./rules/chainedAssignments.ts";
import charAtComparisons from "./rules/charAtComparisons.ts";
import classAssignments from "./rules/classAssignments.ts";
import classFieldDeclarations from "./rules/classFieldDeclarations.ts";
import classLiteralProperties from "./rules/classLiteralProperties.ts";
import classMemberDuplicates from "./rules/classMemberDuplicates.ts";
import classMethodsThis from "./rules/classMethodsThis.ts";
import combinedPushes from "./rules/combinedPushes.ts";
import consecutiveNonNullAssertions from "./rules/consecutiveNonNullAssertions.ts";
import consoleCalls from "./rules/consoleCalls.ts";
import constantAssignments from "./rules/constantAssignments.ts";
import constructorGenericCalls from "./rules/constructorGenericCalls.ts";
import constructorReturns from "./rules/constructorReturns.ts";
import constructorSupers from "./rules/constructorSupers.ts";
import dateConstructorClones from "./rules/dateConstructorClones.ts";
import dateNowTimestamps from "./rules/dateNowTimestamps.ts";
import debuggerStatements from "./rules/debuggerStatements.ts";
import defaultCaseLast from "./rules/defaultCaseLast.ts";
import defaultParameterLast from "./rules/defaultParameterLast.ts";
import deprecated from "./rules/deprecated.ts";
import destructuringConsistency from "./rules/destructuringConsistency.ts";
import duplicateArguments from "./rules/duplicateArguments.ts";
import dynamicDeletes from "./rules/dynamicDeletes.ts";
import elseIfDuplicates from "./rules/elseIfDuplicates.ts";
import elseReturns from "./rules/elseReturns.ts";
import emptyBlocks from "./rules/emptyBlocks.ts";
import emptyDestructures from "./rules/emptyDestructures.ts";
import emptyEnums from "./rules/emptyEnums.ts";
import emptyExports from "./rules/emptyExports.ts";
import emptyFiles from "./rules/emptyFiles.ts";
import emptyFunctions from "./rules/emptyFunctions.ts";
import emptyModuleAttributes from "./rules/emptyModuleAttributes.ts";
import emptyObjectTypes from "./rules/emptyObjectTypes.ts";
import emptyStaticBlocks from "./rules/emptyStaticBlocks.ts";
import emptyTypeParameterLists from "./rules/emptyTypeParameterLists.ts";
import enumInitializers from "./rules/enumInitializers.ts";
import enumMemberLiterals from "./rules/enumMemberLiterals.ts";
import enumValueConsistency from "./rules/enumValueConsistency.ts";
import enumValueDuplicates from "./rules/enumValueDuplicates.ts";
import equalityOperatorNegations from "./rules/equalityOperatorNegations.ts";
import errorMessages from "./rules/errorMessages.ts";
import errorSubclassProperties from "./rules/errorSubclassProperties.ts";
import errorUnnecessaryCaptureStackTraces from "./rules/errorUnnecessaryCaptureStackTraces.ts";
import escapeSequenceCasing from "./rules/escapeSequenceCasing.ts";
import evals from "./rules/evals.ts";
import evolvingVariableTypes from "./rules/evolvingVariableTypes.ts";
import exceptionAssignments from "./rules/exceptionAssignments.ts";
import explicitAnys from "./rules/explicitAnys.ts";
import exponentiationOperators from "./rules/exponentiationOperators.ts";
import exportFromImports from "./rules/exportFromImports.ts";
import exportMutables from "./rules/exportMutables.ts";
import exportUniqueNames from "./rules/exportUniqueNames.ts";
import extraneousClasses from "./rules/extraneousClasses.ts";
import fetchMethodBodies from "./rules/fetchMethodBodies.ts";
import finallyStatementSafety from "./rules/finallyStatementSafety.ts";
import forDirections from "./rules/forDirections.ts";
import forInArrays from "./rules/forInArrays.ts";
import forInGuards from "./rules/forInGuards.ts";
import functionApplySpreads from "./rules/functionApplySpreads.ts";
import functionAssignments from "./rules/functionAssignments.ts";
import functionCurryingRedundancy from "./rules/functionCurryingRedundancy.ts";
import functionDeclarationStyles from "./rules/functionDeclarationStyles.ts";
import functionNameMatches from "./rules/functionNameMatches.ts";
import functionNewCalls from "./rules/functionNewCalls.ts";
import generatorFunctionYields from "./rules/generatorFunctionYields.ts";
import getterReturns from "./rules/getterReturns.ts";
import globalAssignments from "./rules/globalAssignments.ts";
import globalObjectCalls from "./rules/globalObjectCalls.ts";
import globalThisAliases from "./rules/globalThisAliases.ts";
import impliedEvals from "./rules/impliedEvals.ts";
import importEmptyBlocks from "./rules/importEmptyBlocks.ts";
import importTypeSideEffects from "./rules/importTypeSideEffects.ts";
import indexedObjectTypes from "./rules/indexedObjectTypes.ts";
import instanceOfArrays from "./rules/instanceOfArrays.ts";
import irregularWhitespaces from "./rules/irregularWhitespaces.ts";
import isNaNComparisons from "./rules/isNaNComparisons.ts";
import literalConstructorWrappers from "./rules/literalConstructorWrappers.ts";
import mathMethods from "./rules/mathMethods.ts";
import meaninglessVoidOperators from "./rules/meaninglessVoidOperators.ts";
import misleadingVoidExpressions from "./rules/misleadingVoidExpressions.ts";
import moduleSpecifierLists from "./rules/moduleSpecifierLists.ts";
import multilineAmbiguities from "./rules/multilineAmbiguities.ts";
import namedDefaultExports from "./rules/namedDefaultExports.ts";
import namespaceDeclarations from "./rules/namespaceDeclarations.ts";
import namespaceImplicitAmbientImports from "./rules/namespaceImplicitAmbientImports.ts";
import namespaceKeywords from "./rules/namespaceKeywords.ts";
import nativeObjectExtensions from "./rules/nativeObjectExtensions.ts";
import negativeIndexLengthMethods from "./rules/negativeIndexLengthMethods.ts";
import negativeZeroComparisons from "./rules/negativeZeroComparisons.ts";
import nestedStandaloneIfs from "./rules/nestedStandaloneIfs.ts";
import newDefinitions from "./rules/newDefinitions.ts";
import newExpressions from "./rules/newExpressions.ts";
import newNativeNonConstructors from "./rules/newNativeNonConstructors.ts";
import nonNullableTypeAssertions from "./rules/nonNullableTypeAssertions.ts";
import nonNullAssertedNullishCoalesces from "./rules/nonNullAssertedNullishCoalesces.ts";
import nonNullAssertedOptionalChains from "./rules/nonNullAssertedOptionalChains.ts";
import nonNullAssertionPlacement from "./rules/nonNullAssertionPlacement.ts";
import nonOctalDecimalEscapes from "./rules/nonOctalDecimalEscapes.ts";
import nullishCoalescingOperators from "./rules/nullishCoalescingOperators.ts";
import numberMethodRanges from "./rules/numberMethodRanges.ts";
import numberStaticMethods from "./rules/numberStaticMethods.ts";
import numericErasingOperations from "./rules/numericErasingOperations.ts";
import numericLiteralParsing from "./rules/numericLiteralParsing.ts";
import numericPrecision from "./rules/numericPrecision.ts";
import numericSeparatorGroups from "./rules/numericSeparatorGroups.ts";
import objectAssignSpreads from "./rules/objectAssignSpreads.ts";
import objectCalls from "./rules/objectCalls.ts";
import objectEntriesMethods from "./rules/objectEntriesMethods.ts";
import objectHasOwns from "./rules/objectHasOwns.ts";
import objectKeyDuplicates from "./rules/objectKeyDuplicates.ts";
import objectProto from "./rules/objectProto.ts";
import objectPrototypeBuiltIns from "./rules/objectPrototypeBuiltIns.ts";
import objectShorthand from "./rules/objectShorthand.ts";
import objectSpreadUnnecessaryFallbacks from "./rules/objectSpreadUnnecessaryFallbacks.ts";
import objectTypeDefinitions from "./rules/objectTypeDefinitions.ts";
import octalEscapes from "./rules/octalEscapes.ts";
import octalNumbers from "./rules/octalNumbers.ts";
import operatorAssignmentShorthand from "./rules/operatorAssignmentShorthand.ts";
import overloadSignaturesAdjacent from "./rules/overloadSignaturesAdjacent.ts";
import parameterReassignments from "./rules/parameterReassignments.ts";
import parseIntRadixes from "./rules/parseIntRadixes.ts";
import propertyAccessNotation from "./rules/propertyAccessNotation.ts";
import recursionOnlyArguments from "./rules/recursionOnlyArguments.ts";
import redundantTypeConstituents from "./rules/redundantTypeConstituents.ts";
import regexAllGlobalFlags from "./rules/regexAllGlobalFlags.ts";
import regexAmbiguousInvalidity from "./rules/regexAmbiguousInvalidity.ts";
import regexCharacterClasses from "./rules/regexCharacterClasses.ts";
import regexCharacterClassRanges from "./rules/regexCharacterClassRanges.ts";
import regexCharacterClassSetOperations from "./rules/regexCharacterClassSetOperations.ts";
import regexConciseCharacterClassNegations from "./rules/regexConciseCharacterClassNegations.ts";
import regexContradictoryAssertions from "./rules/regexContradictoryAssertions.ts";
import regexControlCharacterEscapes from "./rules/regexControlCharacterEscapes.ts";
import regexControlCharacters from "./rules/regexControlCharacters.ts";
import regexDigitMatchers from "./rules/regexDigitMatchers.ts";
import regexDollarEscapes from "./rules/regexDollarEscapes.ts";
import regexDuplicateCharacterClassCharacters from "./rules/regexDuplicateCharacterClassCharacters.ts";
import regexEmptyAlternatives from "./rules/regexEmptyAlternatives.ts";
import regexEmptyCapturingGroups from "./rules/regexEmptyCapturingGroups.ts";
import regexEmptyCharacterClasses from "./rules/regexEmptyCharacterClasses.ts";
import regexEmptyGroups from "./rules/regexEmptyGroups.ts";
import regexEmptyLazyQuantifiers from "./rules/regexEmptyLazyQuantifiers.ts";
import regexEmptyLookaroundsAssertions from "./rules/regexEmptyLookaroundsAssertions.ts";
import regexEmptyStringLiterals from "./rules/regexEmptyStringLiterals.ts";
import regexEscapeBackspaces from "./rules/regexEscapeBackspaces.ts";
import regexExecutors from "./rules/regexExecutors.ts";
import regexGraphemeStringLiterals from "./rules/regexGraphemeStringLiterals.ts";
import regexHexadecimalEscapes from "./rules/regexHexadecimalEscapes.ts";
import regexIgnoreCaseFlags from "./rules/regexIgnoreCaseFlags.ts";
import regexInvisibleCharacters from "./rules/regexInvisibleCharacters.ts";
import regexLetterCasing from "./rules/regexLetterCasing.ts";
import regexLiterals from "./rules/regexLiterals.ts";
import regexLookaroundAssertions from "./rules/regexLookaroundAssertions.ts";
import regexLookaroundQuantifierOptimizations from "./rules/regexLookaroundQuantifierOptimizations.ts";
import regexMatchNotation from "./rules/regexMatchNotation.ts";
import regexMisleadingCapturingGroups from "./rules/regexMisleadingCapturingGroups.ts";
import regexMisleadingQuantifiers from "./rules/regexMisleadingQuantifiers.ts";
import regexMisleadingUnicodeCharacters from "./rules/regexMisleadingUnicodeCharacters.ts";
import regexNamedBackreferences from "./rules/regexNamedBackreferences.ts";
import regexNamedCaptureGroups from "./rules/regexNamedCaptureGroups.ts";
import regexNamedReplacements from "./rules/regexNamedReplacements.ts";
import regexNonStandardFlags from "./rules/regexNonStandardFlags.ts";
import regexObscureRanges from "./rules/regexObscureRanges.ts";
import regexOctalEscapes from "./rules/regexOctalEscapes.ts";
import regexPlusQuantifiers from "./rules/regexPlusQuantifiers.ts";
import regexPredefinedAssertions from "./rules/regexPredefinedAssertions.ts";
import regexQuestionQuantifiers from "./rules/regexQuestionQuantifiers.ts";
import regexRepeatQuantifiers from "./rules/regexRepeatQuantifiers.ts";
import regexResultArrayGroups from "./rules/regexResultArrayGroups.ts";
import regexSetOperationOptimizations from "./rules/regexSetOperationOptimizations.ts";
import regexStandaloneBackslashes from "./rules/regexStandaloneBackslashes.ts";
import regexStarQuantifiers from "./rules/regexStarQuantifiers.ts";
import regexSuperLinearBacktracking from "./rules/regexSuperLinearBacktracking.ts";
import regexSuperLinearMoves from "./rules/regexSuperLinearMoves.ts";
import regexTestMethods from "./rules/regexTestMethods.ts";
import regexUnicodeCodepointEscapes from "./rules/regexUnicodeCodepointEscapes.ts";
import regexUnicodeEscapes from "./rules/regexUnicodeEscapes.ts";
import regexUnicodeFlag from "./rules/regexUnicodeFlag.ts";
import regexUnicodeProperties from "./rules/regexUnicodeProperties.ts";
import regexUnnecessaryAssertions from "./rules/regexUnnecessaryAssertions.ts";
import regexUnnecessaryBackreferences from "./rules/regexUnnecessaryBackreferences.ts";
import regexUnnecessaryCharacterClasses from "./rules/regexUnnecessaryCharacterClasses.ts";
import regexUnnecessaryCharacterRanges from "./rules/regexUnnecessaryCharacterRanges.ts";
import regexUnnecessaryDisjunctions from "./rules/regexUnnecessaryDisjunctions.ts";
import regexUnnecessaryDollarReplacements from "./rules/regexUnnecessaryDollarReplacements.ts";
import regexUnnecessaryEscapes from "./rules/regexUnnecessaryEscapes.ts";
import regexUnnecessaryLookaroundAssertions from "./rules/regexUnnecessaryLookaroundAssertions.ts";
import regexUnnecessaryNestedAssertions from "./rules/regexUnnecessaryNestedAssertions.ts";
import regexUnnecessaryNestedQuantifiers from "./rules/regexUnnecessaryNestedQuantifiers.ts";
import regexUnnecessaryNonCapturingGroups from "./rules/regexUnnecessaryNonCapturingGroups.ts";
import regexUnnecessaryNumericQuantifiers from "./rules/regexUnnecessaryNumericQuantifiers.ts";
import regexUnnecessaryOptionalAssertions from "./rules/regexUnnecessaryOptionalAssertions.ts";
import regexUnnecessaryReferentialBackreferences from "./rules/regexUnnecessaryReferentialBackreferences.ts";
import regexUnnecessarySetOperands from "./rules/regexUnnecessarySetOperands.ts";
import regexUnusedCapturingGroups from "./rules/regexUnusedCapturingGroups.ts";
import regexUnusedFlags from "./rules/regexUnusedFlags.ts";
import regexUnusedLazyQuantifiers from "./rules/regexUnusedLazyQuantifiers.ts";
import regexUnusedQuantifiers from "./rules/regexUnusedQuantifiers.ts";
import regexValidity from "./rules/regexValidity.ts";
import regexWordMatchers from "./rules/regexWordMatchers.ts";
import regexZeroQuantifiers from "./rules/regexZeroQuantifiers.ts";
import responseJsonMethods from "./rules/responseJsonMethods.ts";
import returnAssignments from "./rules/returnAssignments.ts";
import returnThisTypes from "./rules/returnThisTypes.ts";
import selfAssignments from "./rules/selfAssignments.ts";
import sequences from "./rules/sequences.ts";
import setSizeLengthChecks from "./rules/setSizeLengthChecks.ts";
import setterReturns from "./rules/setterReturns.ts";
import shadowedRestrictedNames from "./rules/shadowedRestrictedNames.ts";
import singleVariableDeclarations from "./rules/singleVariableDeclarations.ts";
import sizeComparisonOperators from "./rules/sizeComparisonOperators.ts";
import sparseArrays from "./rules/sparseArrays.ts";
import staticMemberOnlyClasses from "./rules/staticMemberOnlyClasses.ts";
import stringCaseMismatches from "./rules/stringCaseMismatches.ts";
import stringCodePoints from "./rules/stringCodePoints.ts";
import stringSliceMethods from "./rules/stringSliceMethods.ts";
import stringStartsEndsWith from "./rules/stringStartsEndsWith.ts";
import structuredCloneMethods from "./rules/structuredCloneMethods.ts";
import symbolDescriptions from "./rules/symbolDescriptions.ts";
import thisAliases from "./rules/thisAliases.ts";
import thisBeforeSuper from "./rules/thisBeforeSuper.ts";
import throwErrors from "./rules/throwErrors.ts";
import topLevelAwaits from "./rules/topLevelAwaits.ts";
import tripleSlashReferences from "./rules/tripleSlashReferences.ts";
import tripleSlashReferenceValidity from "./rules/tripleSlashReferenceValidity.ts";
import tsComments from "./rules/tsComments.ts";
import tslintComments from "./rules/tslintComments.ts";
import typeAssertionStyles from "./rules/typeAssertionStyles.ts";
import typeofComparisons from "./rules/typeofComparisons.ts";
import unassignedVariables from "./rules/unassignedVariables.ts";
import undefinedTypeofChecks from "./rules/undefinedTypeofChecks.ts";
import undefinedVariables from "./rules/undefinedVariables.ts";
import unicodeBOMs from "./rules/unicodeBOMs.ts";
import unnecessaryBinds from "./rules/unnecessaryBinds.ts";
import unnecessaryBlocks from "./rules/unnecessaryBlocks.ts";
import unnecessaryBooleanCasts from "./rules/unnecessaryBooleanCasts.ts";
import unnecessaryCatches from "./rules/unnecessaryCatches.ts";
import unnecessaryComparisons from "./rules/unnecessaryComparisons.ts";
import unnecessaryConcatenation from "./rules/unnecessaryConcatenation.ts";
import unnecessaryLogicalComparisons from "./rules/unnecessaryLogicalComparisons.ts";
import unnecessaryMathClamps from "./rules/unnecessaryMathClamps.ts";
import unnecessaryTernaries from "./rules/unnecessaryTernaries.ts";
import unnecessaryUseStricts from "./rules/unnecessaryUseStricts.ts";
import unsafeNegations from "./rules/unsafeNegations.ts";
import variableDeletions from "./rules/variableDeletions.ts";
import voidOperator from "./rules/voidOperator.ts";
import withStatements from "./rules/withStatements.ts";
import wrapperObjects from "./rules/wrapperObjects.ts";
export const ts = createPlugin({
files: {
all: ["**/*.{cjs,js,jsx,mjs,ts,tsx}"],
},
name: "TypeScript",
rules: [
accessorPairGroups,
accessorPairTypes,
accessorThisRecursion,
anyArguments,
anyAssignments,
anyCalls,
anyMemberAccess,
anyReturns,
argumentsRule,
arrayCallbackReturns,
arrayConstructors,
arrayDeleteUnnecessaryCounts,
arrayElementDeletions,
arrayEmptyCallbackSlots,
arrayExistenceChecksConsistency,
arrayFilteredFinds,
arrayFinds,
arrayFlatMapMethods,
arrayFlatMethods,
arrayFlatUnnecessaryDepths,
arrayIncludes,
arrayIncludesMethods,
arrayIndexOfMethods,
arrayLoops,
arrayMapIdentities,
arrayMutableReverses,
arrayMutableSorts,
arrayReduceTypeArguments,
arraySliceUnnecessaryEnd,
arraySomeMethods,
arrayTernarySpreadingConsistency,
arrayTypes,
arrayUnnecessaryLengthChecks,
asConstAssertions,
assignmentOperatorShorthands,
asyncPromiseExecutors,
asyncUnnecessaryPromiseWrappers,
atAccesses,
builtinCoercions,
builtinConstructorNews,
caseDeclarations,
caseDuplicates,
caseFallthroughs,
catchCallbackTypes,
caughtVariableNames,
chainedAssignments,
charAtComparisons,
classAssignments,
classFieldDeclarations,
classLiteralProperties,
classMemberDuplicates,
classMethodsThis,
combinedPushes,
consecutiveNonNullAssertions,
consoleCalls,
constantAssignments,
constructorGenericCalls,
constructorReturns,
constructorSupers,
dateConstructorClones,
dateNowTimestamps,
debuggerStatements,
defaultCaseLast,
defaultParameterLast,
deprecated,
destructuringConsistency,
duplicateArguments,
dynamicDeletes,
elseIfDuplicates,
elseReturns,
emptyBlocks,
emptyDestructures,
emptyEnums,
emptyExports,
emptyFiles,
emptyFunctions,
emptyModuleAttributes,
emptyObjectTypes,
emptyStaticBlocks,
emptyTypeParameterLists,
enumInitializers,
enumMemberLiterals,
enumValueConsistency,
enumValueDuplicates,
equalityOperatorNegations,
errorMessages,
errorSubclassProperties,
errorUnnecessaryCaptureStackTraces,
escapeSequenceCasing,
evals,
evolvingVariableTypes,
exceptionAssignments,
explicitAnys,
exponentiationOperators,
exportFromImports,
exportMutables,
exportUniqueNames,
extraneousClasses,
fetchMethodBodies,
finallyStatementSafety,
forDirections,
forInArrays,
forInGuards,
functionApplySpreads,
functionAssignments,
functionCurryingRedundancy,
functionDeclarationStyles,
functionNameMatches,
functionNewCalls,
generatorFunctionYields,
getterReturns,
globalAssignments,
globalObjectCalls,
globalThisAliases,
impliedEvals,
importEmptyBlocks,
importTypeSideEffects,
indexedObjectTypes,
instanceOfArrays,
irregularWhitespaces,
isNaNComparisons,
literalConstructorWrappers,
mathMethods,
meaninglessVoidOperators,
misleadingVoidExpressions,
moduleSpecifierLists,
multilineAmbiguities,
namedDefaultExports,
namespaceDeclarations,
namespaceImplicitAmbientImports,
namespaceKeywords,
nativeObjectExtensions,
negativeIndexLengthMethods,
negativeZeroComparisons,
nestedStandaloneIfs,
newDefinitions,
newExpressions,
newNativeNonConstructors,
nonNullableTypeAssertions,
nonNullAssertedNullishCoalesces,
nonNullAssertedOptionalChains,
nonNullAssertionPlacement,
nonOctalDecimalEscapes,
nullishCoalescingOperators,
numberMethodRanges,
numberStaticMethods,
numericErasingOperations,
numericLiteralParsing,
numericPrecision,
numericSeparatorGroups,
objectAssignSpreads,
objectCalls,
objectEntriesMethods,
objectHasOwns,
objectKeyDuplicates,
objectProto,
objectPrototypeBuiltIns,
objectShorthand,
objectSpreadUnnecessaryFallbacks,
objectTypeDefinitions,
octalEscapes,
octalNumbers,
operatorAssignmentShorthand,
overloadSignaturesAdjacent,
parameterReassignments,
parseIntRadixes,
propertyAccessNotation,
recursionOnlyArguments,
redundantTypeConstituents,
regexAllGlobalFlags,
regexAmbiguousInvalidity,
regexCharacterClasses,
regexCharacterClassRanges,
regexCharacterClassSetOperations,
regexConciseCharacterClassNegations,
regexContradictoryAssertions,
regexControlCharacterEscapes,
regexControlCharacters,
regexDigitMatchers,
regexDollarEscapes,
regexDuplicateCharacterClassCharacters,
regexEmptyAlternatives,
regexEmptyCapturingGroups,
regexEmptyCharacterClasses,
regexEmptyGroups,
regexEmptyLazyQuantifiers,
regexEmptyLookaroundsAssertions,
regexEmptyStringLiterals,
regexEscapeBackspaces,
regexExecutors,
regexGraphemeStringLiterals,
regexHexadecimalEscapes,
regexIgnoreCaseFlags,
regexInvisibleCharacters,
regexLetterCasing,
regexLiterals,
regexLookaroundAssertions,
regexLookaroundQuantifierOptimizations,
regexMatchNotation,
regexMisleadingCapturingGroups,
regexMisleadingQuantifiers,
regexMisleadingUnicodeCharacters,
regexNamedBackreferences,
regexNamedCaptureGroups,
regexNamedReplacements,
regexNonStandardFlags,
regexObscureRanges,
regexOctalEscapes,
regexPlusQuantifiers,
regexPredefinedAssertions,
regexQuestionQuantifiers,
regexRepeatQuantifiers,
regexResultArrayGroups,
regexSetOperationOptimizations,
regexStandaloneBackslashes,
regexStarQuantifiers,
regexSuperLinearBacktracking,
regexSuperLinearMoves,
regexTestMethods,
regexUnicodeCodepointEscapes,
regexUnicodeEscapes,
regexUnicodeFlag,
regexUnicodeProperties,
regexUnnecessaryAssertions,
regexUnnecessaryBackreferences,
regexUnnecessaryCharacterClasses,
regexUnnecessaryCharacterRanges,
regexUnnecessaryDisjunctions,
regexUnnecessaryDollarReplacements,
regexUnnecessaryEscapes,
regexUnnecessaryLookaroundAssertions,
regexUnnecessaryNestedAssertions,
regexUnnecessaryNestedQuantifiers,
regexUnnecessaryNonCapturingGroups,
regexUnnecessaryNumericQuantifiers,
regexUnnecessaryOptionalAssertions,
regexUnnecessaryReferentialBackreferences,
regexUnnecessarySetOperands,
regexUnusedCapturingGroups,
regexUnusedFlags,
regexUnusedLazyQuantifiers,
regexUnusedQuantifiers,
regexValidity,
regexWordMatchers,
regexZeroQuantifiers,
responseJsonMethods,
returnAssignments,
returnThisTypes,
selfAssignments,
sequences,
setSizeLengthChecks,
setterReturns,
shadowedRestrictedNames,
singleVariableDeclarations,
sizeComparisonOperators,
sparseArrays,
staticMemberOnlyClasses,
stringCaseMismatches,
stringCodePoints,
stringSliceMethods,
stringStartsEndsWith,
structuredCloneMethods,
symbolDescriptions,
thisAliases,
thisBeforeSuper,
throwErrors,
topLevelAwaits,
tripleSlashReferences,
tripleSlashReferenceValidity,
tsComments,
tslintComments,
typeAssertionStyles,
typeofComparisons,
unassignedVariables,
undefinedTypeofChecks,
undefinedVariables,
unicodeBOMs,
unnecessaryBinds,
unnecessaryBlocks,
unnecessaryBooleanCasts,
unnecessaryCatches,
unnecessaryComparisons,
unnecessaryConcatenation,
unnecessaryLogicalComparisons,
unnecessaryMathClamps,
unnecessaryTernaries,
unnecessaryUseStricts,
unsafeNegations,
variableDeletions,
voidOperator,
withStatements,
wrapperObjects,
],
});