@flint.fyi/ts 0.14.5 → 0.15.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 (433) hide show
  1. package/lib/collectReferencedFilePaths.d.ts +1 -0
  2. package/lib/collectReferencedFilePaths.js +3 -2
  3. package/lib/convertTypeScriptDiagnosticToLanguageFileDiagnostic.d.ts +14 -0
  4. package/lib/{formatDiagnostic.js → convertTypeScriptDiagnosticToLanguageFileDiagnostic.js} +23 -15
  5. package/lib/createTypeScriptFileFromProgram.d.ts +4 -1
  6. package/lib/createTypeScriptFileFromProgram.js +25 -30
  7. package/lib/createTypeScriptFileFromProjectService.d.ts +3 -6
  8. package/lib/createTypeScriptFileFromProjectService.js +5 -11
  9. package/lib/directives/parseDirectivesFromTypeScriptFile.d.ts +8 -0
  10. package/lib/directives/parseDirectivesFromTypeScriptFile.js +12 -4
  11. package/lib/directives/parseDirectivesFromTypeScriptFile.test.d.ts +1 -0
  12. package/lib/directives/parseDirectivesFromTypeScriptFile.test.js +1 -0
  13. package/lib/getFirstEnumValues.d.ts +1 -0
  14. package/lib/getFirstEnumValues.js +1 -0
  15. package/lib/getFirstEnumValues.test.d.ts +1 -0
  16. package/lib/getFirstEnumValues.test.js +1 -0
  17. package/lib/getTSNodeRange.d.ts +1 -0
  18. package/lib/getTSNodeRange.js +1 -0
  19. package/lib/index.d.ts +6 -0
  20. package/lib/index.js +5 -0
  21. package/lib/language.d.ts +3 -2
  22. package/lib/language.js +7 -52
  23. package/lib/nodes.d.ts +1 -0
  24. package/lib/nodes.js +1 -0
  25. package/lib/normalizeRange.d.ts +1 -0
  26. package/lib/normalizeRange.js +4 -6
  27. package/lib/plugin.d.ts +79 -50
  28. package/lib/plugin.js +16 -1
  29. package/lib/prepareTypeScriptBasedLanguage.d.ts +11 -0
  30. package/lib/prepareTypeScriptBasedLanguage.js +59 -0
  31. package/lib/prepareTypeScriptFile.d.ts +9 -4
  32. package/lib/prepareTypeScriptFile.js +8 -2
  33. package/lib/rules/anyReturns.d.ts +2 -1
  34. package/lib/rules/anyReturns.js +22 -22
  35. package/lib/rules/anyReturns.test.d.ts +1 -0
  36. package/lib/rules/anyReturns.test.js +1 -0
  37. package/lib/rules/asyncPromiseExecutors.d.ts +2 -1
  38. package/lib/rules/asyncPromiseExecutors.js +4 -3
  39. package/lib/rules/asyncPromiseExecutors.test.d.ts +1 -0
  40. package/lib/rules/asyncPromiseExecutors.test.js +1 -0
  41. package/lib/rules/caseDeclarations.d.ts +3 -1
  42. package/lib/rules/caseDeclarations.js +7 -6
  43. package/lib/rules/caseDeclarations.test.d.ts +1 -0
  44. package/lib/rules/caseDeclarations.test.js +1 -0
  45. package/lib/rules/caseDuplicates.d.ts +2 -1
  46. package/lib/rules/caseDuplicates.js +4 -3
  47. package/lib/rules/caseDuplicates.test.d.ts +1 -0
  48. package/lib/rules/caseDuplicates.test.js +1 -0
  49. package/lib/rules/chainedAssignments.d.ts +2 -1
  50. package/lib/rules/chainedAssignments.js +3 -2
  51. package/lib/rules/chainedAssignments.test.d.ts +1 -0
  52. package/lib/rules/chainedAssignments.test.js +1 -0
  53. package/lib/rules/classAssignments.d.ts +2 -1
  54. package/lib/rules/classAssignments.js +4 -3
  55. package/lib/rules/classAssignments.test.d.ts +1 -0
  56. package/lib/rules/classAssignments.test.js +1 -0
  57. package/lib/rules/consecutiveNonNullAssertions.d.ts +2 -1
  58. package/lib/rules/consecutiveNonNullAssertions.js +1 -0
  59. package/lib/rules/consecutiveNonNullAssertions.test.d.ts +1 -0
  60. package/lib/rules/consecutiveNonNullAssertions.test.js +1 -0
  61. package/lib/rules/constantAssignments.d.ts +2 -1
  62. package/lib/rules/constantAssignments.js +4 -3
  63. package/lib/rules/constantAssignments.test.d.ts +1 -0
  64. package/lib/rules/constantAssignments.test.js +1 -0
  65. package/lib/rules/constructorReturns.d.ts +2 -1
  66. package/lib/rules/constructorReturns.js +3 -2
  67. package/lib/rules/constructorReturns.test.d.ts +1 -0
  68. package/lib/rules/constructorReturns.test.js +1 -0
  69. package/lib/rules/debuggerStatements.d.ts +2 -1
  70. package/lib/rules/debuggerStatements.js +1 -0
  71. package/lib/rules/debuggerStatements.test.d.ts +1 -0
  72. package/lib/rules/debuggerStatements.test.js +1 -0
  73. package/lib/rules/defaultCaseLast.d.ts +2 -1
  74. package/lib/rules/defaultCaseLast.js +4 -3
  75. package/lib/rules/defaultCaseLast.test.d.ts +1 -0
  76. package/lib/rules/defaultCaseLast.test.js +1 -0
  77. package/lib/rules/duplicateArguments.d.ts +3 -1
  78. package/lib/rules/duplicateArguments.js +3 -2
  79. package/lib/rules/duplicateArguments.test.d.ts +1 -0
  80. package/lib/rules/duplicateArguments.test.js +1 -0
  81. package/lib/rules/elseIfDuplicates.d.ts +2 -1
  82. package/lib/rules/elseIfDuplicates.js +6 -5
  83. package/lib/rules/elseIfDuplicates.test.d.ts +1 -0
  84. package/lib/rules/elseIfDuplicates.test.js +1 -0
  85. package/lib/rules/emptyBlocks.d.ts +2 -1
  86. package/lib/rules/emptyBlocks.js +12 -10
  87. package/lib/rules/emptyBlocks.test.d.ts +1 -0
  88. package/lib/rules/emptyBlocks.test.js +1 -0
  89. package/lib/rules/emptyDestructures.d.ts +3 -1
  90. package/lib/rules/emptyDestructures.js +3 -2
  91. package/lib/rules/emptyDestructures.test.d.ts +1 -0
  92. package/lib/rules/emptyDestructures.test.js +1 -0
  93. package/lib/rules/emptyStaticBlocks.d.ts +2 -1
  94. package/lib/rules/emptyStaticBlocks.js +5 -4
  95. package/lib/rules/emptyStaticBlocks.test.d.ts +1 -0
  96. package/lib/rules/emptyStaticBlocks.test.js +1 -0
  97. package/lib/rules/exceptionAssignments.d.ts +2 -1
  98. package/lib/rules/exceptionAssignments.js +4 -3
  99. package/lib/rules/exceptionAssignments.test.d.ts +1 -0
  100. package/lib/rules/exceptionAssignments.test.js +1 -0
  101. package/lib/rules/finallyStatementSafety.d.ts +7 -0
  102. package/lib/rules/finallyStatementSafety.js +71 -0
  103. package/lib/rules/finallyStatementSafety.test.d.ts +2 -0
  104. package/lib/rules/finallyStatementSafety.test.js +307 -0
  105. package/lib/rules/forDirections.d.ts +2 -1
  106. package/lib/rules/forDirections.js +18 -10
  107. package/lib/rules/forDirections.test.d.ts +1 -0
  108. package/lib/rules/forDirections.test.js +26 -0
  109. package/lib/rules/forInArrays.d.ts +2 -1
  110. package/lib/rules/forInArrays.js +8 -7
  111. package/lib/rules/forInArrays.test.d.ts +1 -0
  112. package/lib/rules/forInArrays.test.js +1 -0
  113. package/lib/rules/functionAssignments.d.ts +2 -1
  114. package/lib/rules/functionAssignments.js +4 -3
  115. package/lib/rules/functionAssignments.test.d.ts +1 -0
  116. package/lib/rules/functionAssignments.test.js +1 -0
  117. package/lib/rules/functionCurryingRedundancy.d.ts +7 -0
  118. package/lib/rules/functionCurryingRedundancy.js +77 -0
  119. package/lib/rules/functionCurryingRedundancy.test.d.ts +2 -0
  120. package/lib/rules/functionCurryingRedundancy.test.js +172 -0
  121. package/lib/rules/functionNewCalls.d.ts +3 -1
  122. package/lib/rules/functionNewCalls.js +7 -6
  123. package/lib/rules/functionNewCalls.test.d.ts +1 -0
  124. package/lib/rules/functionNewCalls.test.js +1 -0
  125. package/lib/rules/generatorFunctionYields.d.ts +3 -1
  126. package/lib/rules/generatorFunctionYields.js +3 -2
  127. package/lib/rules/generatorFunctionYields.test.d.ts +1 -0
  128. package/lib/rules/generatorFunctionYields.test.js +1 -0
  129. package/lib/rules/globalAssignments.d.ts +2 -1
  130. package/lib/rules/globalAssignments.js +10 -9
  131. package/lib/rules/globalAssignments.test.d.ts +1 -0
  132. package/lib/rules/globalAssignments.test.js +1 -0
  133. package/lib/rules/globalObjectCalls.d.ts +3 -1
  134. package/lib/rules/globalObjectCalls.js +5 -4
  135. package/lib/rules/globalObjectCalls.test.d.ts +1 -0
  136. package/lib/rules/globalObjectCalls.test.js +1 -0
  137. package/lib/rules/namespaceDeclarations.d.ts +2 -1
  138. package/lib/rules/namespaceDeclarations.js +7 -6
  139. package/lib/rules/namespaceDeclarations.test.d.ts +1 -0
  140. package/lib/rules/namespaceDeclarations.test.js +1 -0
  141. package/lib/rules/negativeZeroComparisons.d.ts +2 -1
  142. package/lib/rules/negativeZeroComparisons.js +8 -7
  143. package/lib/rules/negativeZeroComparisons.test.d.ts +1 -0
  144. package/lib/rules/negativeZeroComparisons.test.js +1 -0
  145. package/lib/rules/newExpressions.d.ts +2 -1
  146. package/lib/rules/newExpressions.js +3 -2
  147. package/lib/rules/newExpressions.test.d.ts +1 -0
  148. package/lib/rules/newExpressions.test.js +1 -0
  149. package/lib/rules/newNativeNonConstructors.d.ts +2 -1
  150. package/lib/rules/newNativeNonConstructors.js +6 -5
  151. package/lib/rules/newNativeNonConstructors.test.d.ts +1 -0
  152. package/lib/rules/newNativeNonConstructors.test.js +1 -0
  153. package/lib/rules/nonOctalDecimalEscapes.d.ts +3 -1
  154. package/lib/rules/nonOctalDecimalEscapes.js +4 -3
  155. package/lib/rules/nonOctalDecimalEscapes.test.d.ts +1 -0
  156. package/lib/rules/nonOctalDecimalEscapes.test.js +1 -0
  157. package/lib/rules/numericLiteralParsing.d.ts +2 -1
  158. package/lib/rules/numericLiteralParsing.js +8 -7
  159. package/lib/rules/numericLiteralParsing.test.d.ts +1 -0
  160. package/lib/rules/numericLiteralParsing.test.js +1 -0
  161. package/lib/rules/objectCalls.d.ts +7 -0
  162. package/lib/rules/objectCalls.js +47 -0
  163. package/lib/rules/objectCalls.test.d.ts +2 -0
  164. package/lib/rules/objectCalls.test.js +172 -0
  165. package/lib/rules/objectHasOwns.d.ts +7 -0
  166. package/lib/rules/objectHasOwns.js +74 -0
  167. package/lib/rules/objectHasOwns.test.d.ts +2 -0
  168. package/lib/rules/objectHasOwns.test.js +112 -0
  169. package/lib/rules/objectKeyDuplicates.d.ts +7 -0
  170. package/lib/rules/objectKeyDuplicates.js +91 -0
  171. package/lib/rules/objectKeyDuplicates.test.d.ts +2 -0
  172. package/lib/rules/objectKeyDuplicates.test.js +180 -0
  173. package/lib/rules/objectProto.d.ts +2 -1
  174. package/lib/rules/objectProto.js +5 -4
  175. package/lib/rules/objectProto.test.d.ts +1 -0
  176. package/lib/rules/objectProto.test.js +1 -0
  177. package/lib/rules/objectPrototypeBuiltIns.d.ts +7 -0
  178. package/lib/rules/objectPrototypeBuiltIns.js +65 -0
  179. package/lib/rules/objectPrototypeBuiltIns.test.d.ts +2 -0
  180. package/lib/rules/objectPrototypeBuiltIns.test.js +146 -0
  181. package/lib/rules/octalEscapes.d.ts +2 -1
  182. package/lib/rules/octalEscapes.js +13 -8
  183. package/lib/rules/octalEscapes.test.d.ts +1 -0
  184. package/lib/rules/octalEscapes.test.js +1 -0
  185. package/lib/rules/octalNumbers.d.ts +2 -1
  186. package/lib/rules/octalNumbers.js +4 -3
  187. package/lib/rules/octalNumbers.test.d.ts +1 -0
  188. package/lib/rules/octalNumbers.test.js +1 -0
  189. package/lib/rules/returnAssignments.d.ts +2 -1
  190. package/lib/rules/returnAssignments.js +7 -6
  191. package/lib/rules/returnAssignments.test.d.ts +1 -0
  192. package/lib/rules/returnAssignments.test.js +1 -0
  193. package/lib/rules/ruleTester.d.ts +1 -0
  194. package/lib/rules/ruleTester.js +6 -1
  195. package/lib/rules/selfAssignments.d.ts +2 -1
  196. package/lib/rules/selfAssignments.js +4 -3
  197. package/lib/rules/selfAssignments.test.d.ts +1 -0
  198. package/lib/rules/selfAssignments.test.js +1 -0
  199. package/lib/rules/selfComparisons.d.ts +2 -1
  200. package/lib/rules/selfComparisons.js +4 -3
  201. package/lib/rules/selfComparisons.test.d.ts +1 -0
  202. package/lib/rules/selfComparisons.test.js +1 -0
  203. package/lib/rules/sequences.d.ts +2 -1
  204. package/lib/rules/sequences.js +3 -2
  205. package/lib/rules/sequences.test.d.ts +1 -0
  206. package/lib/rules/sequences.test.js +1 -0
  207. package/lib/rules/shadowedRestrictedNames.d.ts +2 -1
  208. package/lib/rules/shadowedRestrictedNames.js +24 -23
  209. package/lib/rules/shadowedRestrictedNames.test.d.ts +1 -0
  210. package/lib/rules/shadowedRestrictedNames.test.js +1 -0
  211. package/lib/rules/sparseArrays.d.ts +2 -1
  212. package/lib/rules/sparseArrays.js +5 -4
  213. package/lib/rules/sparseArrays.test.d.ts +1 -0
  214. package/lib/rules/sparseArrays.test.js +1 -0
  215. package/lib/rules/symbolDescriptions.d.ts +2 -1
  216. package/lib/rules/symbolDescriptions.js +3 -2
  217. package/lib/rules/symbolDescriptions.test.d.ts +1 -0
  218. package/lib/rules/symbolDescriptions.test.js +1 -0
  219. package/lib/rules/typeofComparisons.d.ts +2 -1
  220. package/lib/rules/typeofComparisons.js +5 -4
  221. package/lib/rules/typeofComparisons.test.d.ts +1 -0
  222. package/lib/rules/typeofComparisons.test.js +1 -0
  223. package/lib/rules/unassignedVariables.d.ts +2 -1
  224. package/lib/rules/unassignedVariables.js +4 -3
  225. package/lib/rules/unassignedVariables.test.d.ts +1 -0
  226. package/lib/rules/unassignedVariables.test.js +1 -0
  227. package/lib/rules/undefinedVariables.d.ts +2 -1
  228. package/lib/rules/undefinedVariables.js +5 -4
  229. package/lib/rules/undefinedVariables.test.d.ts +1 -0
  230. package/lib/rules/undefinedVariables.test.js +1 -0
  231. package/lib/rules/unicodeBOMs.d.ts +2 -1
  232. package/lib/rules/unicodeBOMs.js +27 -20
  233. package/lib/rules/unicodeBOMs.test.d.ts +1 -0
  234. package/lib/rules/unicodeBOMs.test.js +1 -0
  235. package/lib/rules/unnecessaryBlocks.d.ts +2 -1
  236. package/lib/rules/unnecessaryBlocks.js +4 -3
  237. package/lib/rules/unnecessaryBlocks.test.d.ts +1 -0
  238. package/lib/rules/unnecessaryBlocks.test.js +1 -0
  239. package/lib/rules/unnecessaryCatches.d.ts +2 -1
  240. package/lib/rules/unnecessaryCatches.js +4 -3
  241. package/lib/rules/unnecessaryCatches.test.d.ts +1 -0
  242. package/lib/rules/unnecessaryCatches.test.js +1 -0
  243. package/lib/rules/unnecessaryConcatenation.d.ts +2 -1
  244. package/lib/rules/unnecessaryConcatenation.js +3 -2
  245. package/lib/rules/unnecessaryConcatenation.test.d.ts +1 -0
  246. package/lib/rules/unnecessaryConcatenation.test.js +1 -0
  247. package/lib/rules/unsafeNegations.d.ts +2 -1
  248. package/lib/rules/unsafeNegations.js +3 -2
  249. package/lib/rules/unsafeNegations.test.d.ts +1 -0
  250. package/lib/rules/unsafeNegations.test.js +1 -0
  251. package/lib/rules/utils/discriminateAnyType.d.ts +1 -0
  252. package/lib/rules/utils/discriminateAnyType.js +1 -0
  253. package/lib/rules/utils/getConstrainedType.d.ts +1 -0
  254. package/lib/rules/utils/getConstrainedType.js +1 -0
  255. package/lib/rules/utils/getThisExpression.d.ts +1 -0
  256. package/lib/rules/utils/getThisExpression.js +1 -0
  257. package/lib/rules/utils/isTypeRecursive.d.ts +1 -0
  258. package/lib/rules/utils/isTypeRecursive.js +1 -0
  259. package/lib/rules/utils/isUnsafeAssignment.d.ts +1 -0
  260. package/lib/rules/utils/isUnsafeAssignment.js +1 -0
  261. package/lib/rules/utils/operators.d.ts +1 -0
  262. package/lib/rules/utils/operators.js +1 -0
  263. package/lib/rules/variableDeletions.d.ts +2 -1
  264. package/lib/rules/variableDeletions.js +3 -2
  265. package/lib/rules/variableDeletions.test.d.ts +1 -0
  266. package/lib/rules/variableDeletions.test.js +1 -0
  267. package/lib/rules/voidOperator.d.ts +2 -1
  268. package/lib/rules/voidOperator.js +3 -2
  269. package/lib/rules/voidOperator.test.d.ts +1 -0
  270. package/lib/rules/voidOperator.test.js +1 -0
  271. package/lib/rules/withStatements.d.ts +7 -0
  272. package/lib/rules/withStatements.js +37 -0
  273. package/lib/rules/withStatements.test.d.ts +2 -0
  274. package/lib/rules/withStatements.test.js +27 -0
  275. package/lib/utils/declarationIncludesGlobal.d.ts +1 -0
  276. package/lib/utils/declarationIncludesGlobal.js +1 -0
  277. package/lib/utils/declarationsIncludeGlobal.d.ts +1 -0
  278. package/lib/utils/declarationsIncludeGlobal.js +1 -0
  279. package/lib/utils/getDeclarationsIfGlobal.d.ts +1 -0
  280. package/lib/utils/getDeclarationsIfGlobal.js +1 -0
  281. package/lib/utils/getModifyingReferences.d.ts +1 -0
  282. package/lib/utils/getModifyingReferences.js +1 -0
  283. package/lib/utils/hasSameTokens.d.ts +1 -0
  284. package/lib/utils/hasSameTokens.js +1 -0
  285. package/lib/utils/isFunction.d.ts +3 -0
  286. package/lib/utils/isFunction.js +6 -0
  287. package/lib/utils/isGlobalDeclaration.d.ts +1 -0
  288. package/lib/utils/isGlobalDeclaration.js +1 -0
  289. package/lib/utils/isGlobalDeclarationOfName.d.ts +1 -0
  290. package/lib/utils/isGlobalDeclarationOfName.js +1 -0
  291. package/lib/utils/isGlobalVariable.d.ts +1 -0
  292. package/lib/utils/isGlobalVariable.js +1 -0
  293. package/lib/utils/unwrapParentParenthesizedExpressions.d.ts +1 -0
  294. package/lib/utils/unwrapParentParenthesizedExpressions.js +1 -0
  295. package/lib/utils/unwrapParenthesizedExpression.d.ts +1 -0
  296. package/lib/utils/unwrapParenthesizedExpression.js +1 -0
  297. package/package.json +17 -7
  298. package/CHANGELOG.md +0 -82
  299. package/lib/formatDiagnostic.d.ts +0 -10
  300. package/src/collectReferencedFilePaths.ts +0 -37
  301. package/src/createTypeScriptFileFromProgram.ts +0 -86
  302. package/src/createTypeScriptFileFromProjectService.ts +0 -31
  303. package/src/directives/parseDirectivesFromTypeScriptFile.test.ts +0 -108
  304. package/src/directives/parseDirectivesFromTypeScriptFile.ts +0 -31
  305. package/src/formatDiagnostic.ts +0 -166
  306. package/src/getFirstEnumValues.test.ts +0 -51
  307. package/src/getFirstEnumValues.ts +0 -59
  308. package/src/getTSNodeRange.ts +0 -13
  309. package/src/index.ts +0 -7
  310. package/src/language.ts +0 -122
  311. package/src/nodes.ts +0 -146
  312. package/src/normalizeRange.ts +0 -30
  313. package/src/plugin.ts +0 -111
  314. package/src/prepareTypeScriptFile.ts +0 -14
  315. package/src/rules/anyReturns.test.ts +0 -649
  316. package/src/rules/anyReturns.ts +0 -263
  317. package/src/rules/asyncPromiseExecutors.test.ts +0 -72
  318. package/src/rules/asyncPromiseExecutors.ts +0 -61
  319. package/src/rules/caseDeclarations.test.ts +0 -228
  320. package/src/rules/caseDeclarations.ts +0 -70
  321. package/src/rules/caseDuplicates.test.ts +0 -308
  322. package/src/rules/caseDuplicates.ts +0 -57
  323. package/src/rules/chainedAssignments.test.ts +0 -263
  324. package/src/rules/chainedAssignments.ts +0 -58
  325. package/src/rules/classAssignments.test.ts +0 -157
  326. package/src/rules/classAssignments.ts +0 -50
  327. package/src/rules/consecutiveNonNullAssertions.test.ts +0 -33
  328. package/src/rules/consecutiveNonNullAssertions.ts +0 -46
  329. package/src/rules/constantAssignments.test.ts +0 -222
  330. package/src/rules/constantAssignments.ts +0 -78
  331. package/src/rules/constructorReturns.test.ts +0 -97
  332. package/src/rules/constructorReturns.ts +0 -59
  333. package/src/rules/debuggerStatements.test.ts +0 -81
  334. package/src/rules/debuggerStatements.ts +0 -45
  335. package/src/rules/defaultCaseLast.test.ts +0 -196
  336. package/src/rules/defaultCaseLast.ts +0 -54
  337. package/src/rules/duplicateArguments.test.ts +0 -140
  338. package/src/rules/duplicateArguments.ts +0 -58
  339. package/src/rules/elseIfDuplicates.test.ts +0 -177
  340. package/src/rules/elseIfDuplicates.ts +0 -69
  341. package/src/rules/emptyBlocks.test.ts +0 -136
  342. package/src/rules/emptyBlocks.ts +0 -73
  343. package/src/rules/emptyDestructures.test.ts +0 -187
  344. package/src/rules/emptyDestructures.ts +0 -48
  345. package/src/rules/emptyStaticBlocks.test.ts +0 -168
  346. package/src/rules/emptyStaticBlocks.ts +0 -60
  347. package/src/rules/exceptionAssignments.test.ts +0 -265
  348. package/src/rules/exceptionAssignments.ts +0 -77
  349. package/src/rules/forDirections.test.ts +0 -100
  350. package/src/rules/forDirections.ts +0 -163
  351. package/src/rules/forInArrays.test.ts +0 -25
  352. package/src/rules/forInArrays.ts +0 -70
  353. package/src/rules/functionAssignments.test.ts +0 -210
  354. package/src/rules/functionAssignments.ts +0 -51
  355. package/src/rules/functionNewCalls.test.ts +0 -116
  356. package/src/rules/functionNewCalls.ts +0 -75
  357. package/src/rules/generatorFunctionYields.test.ts +0 -152
  358. package/src/rules/generatorFunctionYields.ts +0 -71
  359. package/src/rules/globalAssignments.test.ts +0 -216
  360. package/src/rules/globalAssignments.ts +0 -67
  361. package/src/rules/globalObjectCalls.test.ts +0 -94
  362. package/src/rules/globalObjectCalls.ts +0 -52
  363. package/src/rules/namespaceDeclarations.test.ts +0 -41
  364. package/src/rules/namespaceDeclarations.ts +0 -74
  365. package/src/rules/negativeZeroComparisons.test.ts +0 -210
  366. package/src/rules/negativeZeroComparisons.ts +0 -87
  367. package/src/rules/newExpressions.test.ts +0 -80
  368. package/src/rules/newExpressions.ts +0 -67
  369. package/src/rules/newNativeNonConstructors.test.ts +0 -95
  370. package/src/rules/newNativeNonConstructors.ts +0 -59
  371. package/src/rules/nonOctalDecimalEscapes.test.ts +0 -70
  372. package/src/rules/nonOctalDecimalEscapes.ts +0 -70
  373. package/src/rules/numericLiteralParsing.test.ts +0 -100
  374. package/src/rules/numericLiteralParsing.ts +0 -116
  375. package/src/rules/objectProto.test.ts +0 -97
  376. package/src/rules/objectProto.ts +0 -62
  377. package/src/rules/octalEscapes.test.ts +0 -214
  378. package/src/rules/octalEscapes.ts +0 -85
  379. package/src/rules/octalNumbers.test.ts +0 -246
  380. package/src/rules/octalNumbers.ts +0 -75
  381. package/src/rules/returnAssignments.test.ts +0 -186
  382. package/src/rules/returnAssignments.ts +0 -57
  383. package/src/rules/ruleTester.ts +0 -4
  384. package/src/rules/selfAssignments.test.ts +0 -67
  385. package/src/rules/selfAssignments.ts +0 -50
  386. package/src/rules/selfComparisons.test.ts +0 -298
  387. package/src/rules/selfComparisons.ts +0 -45
  388. package/src/rules/sequences.test.ts +0 -49
  389. package/src/rules/sequences.ts +0 -37
  390. package/src/rules/shadowedRestrictedNames.test.ts +0 -148
  391. package/src/rules/shadowedRestrictedNames.ts +0 -105
  392. package/src/rules/sparseArrays.test.ts +0 -111
  393. package/src/rules/sparseArrays.ts +0 -61
  394. package/src/rules/symbolDescriptions.test.ts +0 -90
  395. package/src/rules/symbolDescriptions.ts +0 -47
  396. package/src/rules/typeofComparisons.test.ts +0 -86
  397. package/src/rules/typeofComparisons.ts +0 -88
  398. package/src/rules/unassignedVariables.test.ts +0 -73
  399. package/src/rules/unassignedVariables.ts +0 -69
  400. package/src/rules/undefinedVariables.test.ts +0 -81
  401. package/src/rules/undefinedVariables.ts +0 -97
  402. package/src/rules/unicodeBOMs.test.ts +0 -67
  403. package/src/rules/unicodeBOMs.ts +0 -44
  404. package/src/rules/unnecessaryBlocks.test.ts +0 -148
  405. package/src/rules/unnecessaryBlocks.ts +0 -89
  406. package/src/rules/unnecessaryCatches.test.ts +0 -211
  407. package/src/rules/unnecessaryCatches.ts +0 -84
  408. package/src/rules/unnecessaryConcatenation.test.ts +0 -88
  409. package/src/rules/unnecessaryConcatenation.ts +0 -44
  410. package/src/rules/unsafeNegations.test.ts +0 -64
  411. package/src/rules/unsafeNegations.ts +0 -59
  412. package/src/rules/utils/discriminateAnyType.ts +0 -66
  413. package/src/rules/utils/getConstrainedType.ts +0 -9
  414. package/src/rules/utils/getThisExpression.ts +0 -24
  415. package/src/rules/utils/isTypeRecursive.ts +0 -10
  416. package/src/rules/utils/isUnsafeAssignment.ts +0 -113
  417. package/src/rules/utils/operators.ts +0 -39
  418. package/src/rules/variableDeletions.test.ts +0 -76
  419. package/src/rules/variableDeletions.ts +0 -43
  420. package/src/rules/voidOperator.test.ts +0 -99
  421. package/src/rules/voidOperator.ts +0 -38
  422. package/src/utils/declarationIncludesGlobal.ts +0 -9
  423. package/src/utils/declarationsIncludeGlobal.ts +0 -7
  424. package/src/utils/getDeclarationsIfGlobal.ts +0 -14
  425. package/src/utils/getModifyingReferences.ts +0 -58
  426. package/src/utils/hasSameTokens.ts +0 -45
  427. package/src/utils/isGlobalDeclaration.ts +0 -10
  428. package/src/utils/isGlobalDeclarationOfName.ts +0 -56
  429. package/src/utils/isGlobalVariable.ts +0 -30
  430. package/src/utils/unwrapParentParenthesizedExpressions.ts +0 -7
  431. package/src/utils/unwrapParenthesizedExpression.ts +0 -9
  432. package/tsconfig.json +0 -9
  433. package/tsconfig.tsbuildinfo +0 -1
@@ -1,177 +0,0 @@
1
- import rule from "./elseIfDuplicates.js";
2
- import { ruleTester } from "./ruleTester.js";
3
-
4
- ruleTester.describe(rule, {
5
- invalid: [
6
- {
7
- code: `
8
- if (isSomething(value)) {
9
- doFirst();
10
- } else if (isSomething(value)) {
11
- doSecond();
12
- }
13
- `,
14
- snapshot: `
15
- if (isSomething(value)) {
16
- doFirst();
17
- } else if (isSomething(value)) {
18
- ~~~~~~~~~~~~~~~~~~
19
- This condition is identical to a previous condition in the if-else-if chain.
20
- doSecond();
21
- }
22
- `,
23
- },
24
- {
25
- code: `
26
- if (isSomething /* ... */ (value)) {
27
- doFirst();
28
- } else if (isSomething(value /* ... */)) {
29
- doSecond();
30
- }
31
- `,
32
- snapshot: `
33
- if (isSomething /* ... */ (value)) {
34
- doFirst();
35
- } else if (isSomething(value /* ... */)) {
36
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37
- This condition is identical to a previous condition in the if-else-if chain.
38
- doSecond();
39
- }
40
- `,
41
- },
42
- {
43
- code: `
44
- if (first) {
45
- handleFirst();
46
- } else if (second) {
47
- handleSecond();
48
- } else if (third && fourth) {
49
- handleThird();
50
- } else if (third && fourth) {
51
- handleFourth();
52
- }
53
- `,
54
- snapshot: `
55
- if (first) {
56
- handleFirst();
57
- } else if (second) {
58
- handleSecond();
59
- } else if (third && fourth) {
60
- handleThird();
61
- } else if (third && fourth) {
62
- ~~~~~~~~~~~~~~~
63
- This condition is identical to a previous condition in the if-else-if chain.
64
- handleFourth();
65
- }
66
- `,
67
- },
68
- {
69
- code: `
70
- if (count === 1) {
71
- handleOne();
72
- } else if (count === 2) {
73
- handleTwo();
74
- } else if (count === 3) {
75
- handleThree();
76
- } else if (count === 2) {
77
- handleFour();
78
- } else if (count === 5) {
79
- handleFive();
80
- }
81
- `,
82
- snapshot: `
83
- if (count === 1) {
84
- handleOne();
85
- } else if (count === 2) {
86
- handleTwo();
87
- } else if (count === 3) {
88
- handleThree();
89
- } else if (count === 2) {
90
- ~~~~~~~~~~~
91
- This condition is identical to a previous condition in the if-else-if chain.
92
- handleFour();
93
- } else if (count === 5) {
94
- handleFive();
95
- }
96
- `,
97
- },
98
- {
99
- code: `
100
- if (value === "first") {
101
- process();
102
- } else if (value === "second") {
103
- process();
104
- } else if (value === "first") {
105
- process();
106
- }
107
- `,
108
- snapshot: `
109
- if (value === "first") {
110
- process();
111
- } else if (value === "second") {
112
- process();
113
- } else if (value === "first") {
114
- ~~~~~~~~~~~~~~~~~
115
- This condition is identical to a previous condition in the if-else-if chain.
116
- process();
117
- }
118
- `,
119
- },
120
- {
121
- code: `
122
- if (isValid && isActive) {
123
- execute();
124
- } else if (isPending) {
125
- wait();
126
- } else if (isValid && isActive) {
127
- execute();
128
- }
129
- `,
130
- snapshot: `
131
- if (isValid && isActive) {
132
- execute();
133
- } else if (isPending) {
134
- wait();
135
- } else if (isValid && isActive) {
136
- ~~~~~~~~~~~~~~~~~~~
137
- This condition is identical to a previous condition in the if-else-if chain.
138
- execute();
139
- }
140
- `,
141
- },
142
- {
143
- code: `
144
- if (value) {
145
- first();
146
- } else if (value) {
147
- second();
148
- } else if (value) {
149
- third();
150
- }
151
- `,
152
- snapshot: `
153
- if (value) {
154
- first();
155
- } else if (value) {
156
- ~~~~~
157
- This condition is identical to a previous condition in the if-else-if chain.
158
- second();
159
- } else if (value) {
160
- ~~~~~
161
- This condition is identical to a previous condition in the if-else-if chain.
162
- third();
163
- }
164
- `,
165
- },
166
- ],
167
- valid: [
168
- `if (isSomething(value)) { doFirst(); } else if (isSomethingElse(value)) { doSecond(); }`,
169
- `if (first) { handleFirst(); } else if (second) { handleSecond(); } else if (third && fourth) { handleThird(); } else if (third && fifth) { handleFourth(); }`,
170
- `if (count === 1) { handleOne(); } else if (count === 2) { handleTwo(); } else if (count === 3) { handleThree(); } else if (count === 4) { handleFour(); }`,
171
- `if (value === "first") { process(); } else if (value === "second") { process(); } else if (value === "third") { process(); }`,
172
- `if (isValid) { execute(); } else if (isPending) { wait(); } else if (isInvalid) { reject(); }`,
173
- `if (value) { process(); }`,
174
- `if (first) { doFirst(); } else { doSecond(); }`,
175
- `if (first) { doFirst(); } else if (second) { doSecond(); } else { doDefault(); }`,
176
- ],
177
- });
@@ -1,69 +0,0 @@
1
- import * as ts from "typescript";
2
-
3
- import { getTSNodeRange } from "../getTSNodeRange.js";
4
- import { typescriptLanguage } from "../language.js";
5
- import { hasSameTokens } from "../utils/hasSameTokens.js";
6
-
7
- export default typescriptLanguage.createRule({
8
- about: {
9
- description:
10
- "Reports duplicate conditions in if-else-if chains that make code unreachable.",
11
- id: "elseIfDuplicates",
12
- preset: "logical",
13
- },
14
- messages: {
15
- duplicateCondition: {
16
- primary:
17
- "This condition is identical to a previous condition in the if-else-if chain.",
18
- secondary: [
19
- "When an if-else-if chain has duplicate conditions, the duplicate branch will never execute because the earlier identical condition will always be evaluated first.",
20
- "This typically indicates a copy-paste error or logic mistake.",
21
- ],
22
- suggestions: [
23
- "Verify the condition logic is correct and update to check for the intended condition.",
24
- ],
25
- },
26
- },
27
- setup(context) {
28
- function checkIfStatement(node: ts.IfStatement) {
29
- const seen: ts.Expression[] = [];
30
- let current: ts.IfStatement = node;
31
-
32
- while (true) {
33
- if (
34
- seen.some((previous) =>
35
- hasSameTokens(previous, current.expression, context.sourceFile),
36
- )
37
- ) {
38
- context.report({
39
- message: "duplicateCondition",
40
- range: getTSNodeRange(current.expression, context.sourceFile),
41
- });
42
- }
43
-
44
- if (
45
- !current.elseStatement ||
46
- !ts.isIfStatement(current.elseStatement)
47
- ) {
48
- break;
49
- }
50
-
51
- seen.push(current.expression);
52
- current = current.elseStatement;
53
- }
54
- }
55
-
56
- return {
57
- visitors: {
58
- IfStatement: (node) => {
59
- if (
60
- !ts.isIfStatement(node.parent) ||
61
- node.parent.elseStatement !== node
62
- ) {
63
- checkIfStatement(node);
64
- }
65
- },
66
- },
67
- };
68
- },
69
- });
@@ -1,136 +0,0 @@
1
- import rule from "./emptyBlocks.js";
2
- import { ruleTester } from "./ruleTester.js";
3
-
4
- ruleTester.describe(rule, {
5
- invalid: [
6
- {
7
- code: `
8
- if (condition) {}
9
- `,
10
- snapshot: `
11
- if (condition) {}
12
- ~~
13
- Empty block statements should be removed or contain code.
14
- `,
15
- },
16
- {
17
- code: `
18
- if (condition) {
19
- } else {}
20
- `,
21
- snapshot: `
22
- if (condition) {
23
- ~
24
- Empty block statements should be removed or contain code.
25
- } else {}
26
- ~
27
- ~~
28
- Empty block statements should be removed or contain code.
29
- `,
30
- },
31
- {
32
- code: `
33
- while (condition) {}
34
- `,
35
- snapshot: `
36
- while (condition) {}
37
- ~~
38
- Empty block statements should be removed or contain code.
39
- `,
40
- },
41
- {
42
- code: `
43
- for (let i = 0; i < 10; i++) {}
44
- `,
45
- snapshot: `
46
- for (let i = 0; i < 10; i++) {}
47
- ~~
48
- Empty block statements should be removed or contain code.
49
- `,
50
- },
51
- {
52
- code: `
53
- switch (value) {}
54
- `,
55
- snapshot: `
56
- switch (value) {}
57
- ~~
58
- Empty block statements should be removed or contain code.
59
- `,
60
- },
61
- {
62
- code: `
63
- do {} while (condition);
64
- `,
65
- snapshot: `
66
- do {} while (condition);
67
- ~~
68
- Empty block statements should be removed or contain code.
69
- `,
70
- },
71
- {
72
- code: `
73
- if (x) {
74
- doSomething();
75
- } else if (y) {}
76
- `,
77
- snapshot: `
78
- if (x) {
79
- doSomething();
80
- } else if (y) {}
81
- ~~
82
- Empty block statements should be removed or contain code.
83
- `,
84
- },
85
- {
86
- code: `
87
- try {
88
- doSomething();
89
- } finally {}
90
- `,
91
- snapshot: `
92
- try {
93
- doSomething();
94
- } finally {}
95
- ~~
96
- Empty block statements should be removed or contain code.
97
- `,
98
- },
99
- ],
100
- valid: [
101
- `if (condition) { doSomething(); }`,
102
- `while (condition) { doSomething(); }`,
103
- `for (let i = 0; i < 10; i++) { doSomething(); }`,
104
- `switch (value) { case 1: break; }`,
105
- `do { doSomething(); } while (condition);`,
106
- `function test() {}`,
107
- `const fn = function() {};`,
108
- `const arrow = () => {};`,
109
- `class MyClass { method() {} }`,
110
- `class MyClass { constructor() {} }`,
111
- `class MyClass { get value() {} }`,
112
- `class MyClass { set value(v) {} }`,
113
- `
114
- if (condition) {
115
- // Intentionally empty
116
- }
117
- `,
118
- `
119
- while (condition) {
120
- /* Do nothing */
121
- }
122
- `,
123
- `
124
- try {
125
- doSomething();
126
- } catch (error) {}
127
- `,
128
- `
129
- try {
130
- doSomething();
131
- } catch (error) {
132
- // Ignore errors
133
- }
134
- `,
135
- ],
136
- });
@@ -1,73 +0,0 @@
1
- import * as ts from "typescript";
2
-
3
- import { getTSNodeRange } from "../getTSNodeRange.js";
4
- import { typescriptLanguage } from "../language.js";
5
-
6
- const allowedParents = new Set([
7
- ts.SyntaxKind.ArrowFunction,
8
- ts.SyntaxKind.CatchClause,
9
- ts.SyntaxKind.Constructor,
10
- ts.SyntaxKind.FunctionDeclaration,
11
- ts.SyntaxKind.FunctionExpression,
12
- ts.SyntaxKind.GetAccessor,
13
- ts.SyntaxKind.MethodDeclaration,
14
- ts.SyntaxKind.SetAccessor,
15
- ]);
16
-
17
- export default typescriptLanguage.createRule({
18
- about: {
19
- description: "Reports empty block statements that should contain code.",
20
- id: "emptyBlocks",
21
- preset: "stylistic",
22
- },
23
- messages: {
24
- emptyBlock: {
25
- primary: "Empty block statements should be removed or contain code.",
26
- secondary: [
27
- "Empty blocks can indicate incomplete code or areas where logic was removed but the block structure was left behind.",
28
- "They can also reduce code readability by cluttering the codebase with unnecessary braces.",
29
- ],
30
- suggestions: [
31
- "Add a comment explaining why the block is intentionally empty, or remove the empty block entirely.",
32
- ],
33
- },
34
- },
35
- setup(context) {
36
- function hasComments(block: ts.Block): boolean {
37
- const fullText = context.sourceFile.getFullText();
38
-
39
- const openBrace = block.getStart(context.sourceFile);
40
- const closeBrace = block.getEnd();
41
- const innerText = fullText.substring(openBrace + 1, closeBrace - 1);
42
-
43
- // Check if there are any non-whitespace characters (which would be comments)
44
- // since we already know there are no statements
45
- return /\S+/.test(innerText.trim());
46
- }
47
-
48
- function isEmptyBlock(block: ts.Block): boolean {
49
- return block.statements.length === 0 && !hasComments(block);
50
- }
51
-
52
- return {
53
- visitors: {
54
- Block: (node) => {
55
- if (!allowedParents.has(node.parent.kind) && isEmptyBlock(node)) {
56
- context.report({
57
- message: "emptyBlock",
58
- range: getTSNodeRange(node, context.sourceFile),
59
- });
60
- }
61
- },
62
- CaseBlock: (node) => {
63
- if (node.clauses.length === 0) {
64
- context.report({
65
- message: "emptyBlock",
66
- range: getTSNodeRange(node, context.sourceFile),
67
- });
68
- }
69
- },
70
- },
71
- };
72
- },
73
- });
@@ -1,187 +0,0 @@
1
- import rule from "./emptyDestructures.js";
2
- import { ruleTester } from "./ruleTester.js";
3
-
4
- ruleTester.describe(rule, {
5
- invalid: [
6
- {
7
- code: `
8
- const {} = object;
9
- `,
10
- snapshot: `
11
- const {} = object;
12
- ~~
13
- Destructuring patterns that don't extract at least one value are unnecessary.
14
- `,
15
- },
16
- {
17
- code: `
18
- const [] = array;
19
- `,
20
- snapshot: `
21
- const [] = array;
22
- ~~
23
- Destructuring patterns that don't extract at least one value are unnecessary.
24
- `,
25
- },
26
- {
27
- code: `
28
- function process({}) {
29
- console.log("processed");
30
- }
31
- `,
32
- snapshot: `
33
- function process({}) {
34
- ~~
35
- Destructuring patterns that don't extract at least one value are unnecessary.
36
- console.log("processed");
37
- }
38
- `,
39
- },
40
- {
41
- code: `
42
- function process([]) {
43
- console.log("processed");
44
- }
45
- `,
46
- snapshot: `
47
- function process([]) {
48
- ~~
49
- Destructuring patterns that don't extract at least one value are unnecessary.
50
- console.log("processed");
51
- }
52
- `,
53
- },
54
- {
55
- code: `
56
- const process = ({}) => {
57
- console.log("processed");
58
- };
59
- `,
60
- snapshot: `
61
- const process = ({}) => {
62
- ~~
63
- Destructuring patterns that don't extract at least one value are unnecessary.
64
- console.log("processed");
65
- };
66
- `,
67
- },
68
- {
69
- code: `
70
- const process = ([]) => {
71
- console.log("processed");
72
- };
73
- `,
74
- snapshot: `
75
- const process = ([]) => {
76
- ~~
77
- Destructuring patterns that don't extract at least one value are unnecessary.
78
- console.log("processed");
79
- };
80
- `,
81
- },
82
- {
83
- code: `
84
- const { prop: {} } = object;
85
- `,
86
- snapshot: `
87
- const { prop: {} } = object;
88
- ~~
89
- Destructuring patterns that don't extract at least one value are unnecessary.
90
- `,
91
- },
92
- {
93
- code: `
94
- const { prop: [] } = object;
95
- `,
96
- snapshot: `
97
- const { prop: [] } = object;
98
- ~~
99
- Destructuring patterns that don't extract at least one value are unnecessary.
100
- `,
101
- },
102
- {
103
- code: `
104
- for (const {} of objects) {
105
- console.log("iterating");
106
- }
107
- `,
108
- snapshot: `
109
- for (const {} of objects) {
110
- ~~
111
- Destructuring patterns that don't extract at least one value are unnecessary.
112
- console.log("iterating");
113
- }
114
- `,
115
- },
116
- {
117
- code: `
118
- for (const [] of arrays) {
119
- console.log("iterating");
120
- }
121
- `,
122
- snapshot: `
123
- for (const [] of arrays) {
124
- ~~
125
- Destructuring patterns that don't extract at least one value are unnecessary.
126
- console.log("iterating");
127
- }
128
- `,
129
- },
130
- {
131
- code: `
132
- try {
133
- doSomething();
134
- } catch ({}) {
135
- console.log("error");
136
- }
137
- `,
138
- snapshot: `
139
- try {
140
- doSomething();
141
- } catch ({}) {
142
- ~~
143
- Destructuring patterns that don't extract at least one value are unnecessary.
144
- console.log("error");
145
- }
146
- `,
147
- },
148
- {
149
- code: `
150
- try {
151
- doSomething();
152
- } catch ([]) {
153
- console.log("error");
154
- }
155
- `,
156
- snapshot: `
157
- try {
158
- doSomething();
159
- } catch ([]) {
160
- ~~
161
- Destructuring patterns that don't extract at least one value are unnecessary.
162
- console.log("error");
163
- }
164
- `,
165
- },
166
- ],
167
- valid: [
168
- `const { a } = object;`,
169
- `const { a, b } = object;`,
170
- `const [ a ] = array;`,
171
- `const [ a, b ] = array;`,
172
- `function process({ a }) { console.log(a); }`,
173
- `function process([ a ]) { console.log(a); }`,
174
- `const process = ({ a }) => console.log(a);`,
175
- `const process = ([ a ]) => console.log(a);`,
176
- `const { prop: { nested } } = object;`,
177
- `const { prop: [ element ] } = object;`,
178
- `for (const { value } of objects) { console.log(value); }`,
179
- `for (const [ value ] of arrays) { console.log(value); }`,
180
- `try { doSomething(); } catch ({ message }) { console.log(message); }`,
181
- `try { doSomething(); } catch ([ first ]) { console.log(first); }`,
182
- `const object = {};`,
183
- `const array = [];`,
184
- `function returnEmpty() { return {}; }`,
185
- `function returnEmptyArray() { return []; }`,
186
- ],
187
- });
@@ -1,48 +0,0 @@
1
- import * as ts from "typescript";
2
-
3
- import { typescriptLanguage } from "../language.js";
4
-
5
- export default typescriptLanguage.createRule({
6
- about: {
7
- description:
8
- "Reports using empty destructuring patterns that destructure no values.",
9
- id: "emptyDestructures",
10
- preset: "logical",
11
- },
12
- messages: {
13
- emptyPattern: {
14
- primary:
15
- "Destructuring patterns that don't extract at least one value are unnecessary.",
16
- secondary: [
17
- "Empty destructuring patterns like `{}` or `[]` don't extract any values and serve no practical purpose.",
18
- "These patterns are likely mistakes or leftover code from refactoring.",
19
- ],
20
- suggestions: [
21
- "Remove the empty destructuring pattern if it's not needed.",
22
- "Add bindings to extract values if you intended to destructure specific properties.",
23
- ],
24
- },
25
- },
26
- setup(context) {
27
- function checkBindingPattern(
28
- node: ts.ArrayBindingPattern | ts.ObjectBindingPattern,
29
- ) {
30
- if (node.elements.length === 0) {
31
- context.report({
32
- message: "emptyPattern",
33
- range: {
34
- begin: node.getStart(context.sourceFile),
35
- end: node.getEnd(),
36
- },
37
- });
38
- }
39
- }
40
-
41
- return {
42
- visitors: {
43
- ArrayBindingPattern: checkBindingPattern,
44
- ObjectBindingPattern: checkBindingPattern,
45
- },
46
- };
47
- },
48
- });