xo 0.52.2 → 0.52.3

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 (189) hide show
  1. package/lib/options-manager.js +4 -3
  2. package/node_modules/@typescript-eslint/eslint-plugin/README.md +1 -1
  3. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js +1 -1
  4. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js.map +1 -1
  5. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js +2 -0
  6. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js.map +1 -1
  7. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js +5 -5
  8. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js.map +1 -1
  9. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js +68 -164
  10. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js.map +1 -1
  11. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js +9 -0
  12. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js.map +1 -1
  13. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-blocks.js +1 -0
  14. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-blocks.js.map +1 -1
  15. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js +1 -0
  16. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js.map +1 -1
  17. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/type-annotation-spacing.js +3 -1
  18. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/type-annotation-spacing.js.map +1 -1
  19. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +2 -1
  20. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js.map +1 -1
  21. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js +3 -3
  22. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js.map +1 -1
  23. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-optional-chain.md +1 -11
  24. package/node_modules/@typescript-eslint/eslint-plugin/package.json +5 -5
  25. package/node_modules/@typescript-eslint/parser/README.md +1 -1
  26. package/node_modules/@typescript-eslint/parser/_ts3.4/dist/index.d.ts +4 -0
  27. package/node_modules/@typescript-eslint/parser/_ts3.4/dist/parser.d.ts +20 -0
  28. package/node_modules/@typescript-eslint/parser/package.json +5 -5
  29. package/node_modules/@typescript-eslint/scope-manager/README.md +1 -1
  30. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts.map +1 -1
  31. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts.map +1 -1
  32. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js +0 -3
  33. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js.map +1 -1
  34. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js +8 -23
  35. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js.map +1 -1
  36. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts.map +1 -1
  37. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js +2 -3
  38. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js.map +1 -1
  39. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts.map +1 -1
  40. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts +3 -0
  41. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts.map +1 -0
  42. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js +12 -0
  43. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js.map +1 -0
  44. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js +3 -1
  45. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js.map +1 -1
  46. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.d.ts +3 -0
  47. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.d.ts.map +1 -0
  48. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.js +12 -0
  49. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.js.map +1 -0
  50. package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts +2 -0
  51. package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts.map +1 -1
  52. package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js +4 -0
  53. package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js.map +1 -1
  54. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts.map +1 -1
  55. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js +7 -6
  56. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js.map +1 -1
  57. package/node_modules/@typescript-eslint/scope-manager/package.json +5 -5
  58. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/containsAllTypesByName.d.ts +8 -0
  59. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getConstrainedTypeAtLocation.d.ts +6 -0
  60. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getContextualType.d.ts +8 -0
  61. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getDeclaration.d.ts +6 -0
  62. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getSourceFileOfNode.d.ts +6 -0
  63. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTokenAtPosition.d.ts +3 -0
  64. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeArguments.d.ts +3 -0
  65. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeName.d.ts +8 -0
  66. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/index.d.ts +16 -0
  67. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isTypeReadonly.d.ts +20 -0
  68. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isUnsafeAssignment.d.ts +17 -0
  69. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/predicates.d.ts +52 -0
  70. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/propertyTypes.d.ts +4 -0
  71. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/requiresQuoting.d.ts +4 -0
  72. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/typeFlagUtils.d.ts +11 -0
  73. package/node_modules/@typescript-eslint/type-utils/dist/index.d.ts +1 -0
  74. package/node_modules/@typescript-eslint/type-utils/dist/index.d.ts.map +1 -1
  75. package/node_modules/@typescript-eslint/type-utils/dist/index.js +5 -0
  76. package/node_modules/@typescript-eslint/type-utils/dist/index.js.map +1 -1
  77. package/node_modules/@typescript-eslint/type-utils/package.json +5 -4
  78. package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +1732 -0
  79. package/node_modules/@typescript-eslint/types/_ts3.4/dist/index.d.ts +5 -0
  80. package/node_modules/@typescript-eslint/types/_ts3.4/dist/lib.d.ts +3 -0
  81. package/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts +36 -0
  82. package/node_modules/@typescript-eslint/types/_ts3.4/dist/ts-estree.d.ts +9 -0
  83. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +2 -2
  84. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
  85. package/node_modules/@typescript-eslint/types/dist/lib.d.ts +1 -1
  86. package/node_modules/@typescript-eslint/types/dist/lib.d.ts.map +1 -1
  87. package/node_modules/@typescript-eslint/types/package.json +2 -2
  88. package/node_modules/@typescript-eslint/typescript-estree/README.md +1 -1
  89. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ast-converter.d.ts +9 -0
  90. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert-comments.d.ts +11 -0
  91. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert.d.ts +159 -0
  92. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/WatchCompilerHostOfConfigFile.d.ts +13 -0
  93. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createDefaultProgram.d.ts +12 -0
  94. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createIsolatedProgram.d.ts +9 -0
  95. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createProjectProgram.d.ts +11 -0
  96. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createSourceFile.d.ts +5 -0
  97. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createWatchProgram.d.ts +19 -0
  98. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getScriptKind.d.ts +5 -0
  99. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +22 -0
  100. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/useProvidedPrograms.d.ts +13 -0
  101. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/getModifiers.d.ts +4 -0
  102. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts +12 -0
  103. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/jsx/xhtml-entities.d.ts +2 -0
  104. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/node-utils.d.ts +230 -0
  105. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +188 -0
  106. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser.d.ts +25 -0
  107. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/semantic-or-syntactic-errors.d.ts +13 -0
  108. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/simple-traverse.d.ts +9 -0
  109. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts +175 -0
  110. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/index.d.ts +4 -0
  111. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts +18 -0
  112. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/version-check.d.ts +3 -0
  113. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts +3 -1
  114. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map +1 -1
  115. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +67 -28
  116. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -1
  117. package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts +4 -0
  118. package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts.map +1 -0
  119. package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js +68 -0
  120. package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js.map +1 -0
  121. package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts +2 -0
  122. package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map +1 -1
  123. package/node_modules/@typescript-eslint/typescript-estree/dist/index.js +4 -1
  124. package/node_modules/@typescript-eslint/typescript-estree/dist/index.js.map +1 -1
  125. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map +1 -1
  126. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js +11 -9
  127. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map +1 -1
  128. package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js +1 -1
  129. package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts +1 -1
  130. package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts.map +1 -1
  131. package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js +8 -1
  132. package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js.map +1 -1
  133. package/node_modules/@typescript-eslint/typescript-estree/package.json +5 -5
  134. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +48 -0
  135. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +76 -0
  136. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/astUtilities.d.ts +76 -0
  137. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/index.d.ts +6 -0
  138. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/predicates.d.ts +32 -0
  139. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +18 -0
  140. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/helpers.d.ts +1153 -0
  141. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/index.d.ts +5 -0
  142. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/misc.d.ts +8 -0
  143. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/predicates.d.ts +58 -0
  144. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/InferTypesFromRule.d.ts +11 -0
  145. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleCreator.d.ts +35 -0
  146. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleTester.d.ts +18 -0
  147. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/applyDefault.d.ts +10 -0
  148. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/batchedSingleLineTests.d.ts +24 -0
  149. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/deepMerge.d.ts +17 -0
  150. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/getParserServices.d.ts +8 -0
  151. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/index.d.ts +9 -0
  152. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/nullThrows.d.ts +14 -0
  153. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/index.d.ts +8 -0
  154. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/json-schema.d.ts +2 -0
  155. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/AST.d.ts +9 -0
  156. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/CLIEngine.d.ts +137 -0
  157. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ESLint.d.ts +376 -0
  158. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Linter.d.ts +326 -0
  159. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ParserOptions.d.ts +2 -0
  160. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Rule.d.ts +393 -0
  161. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/RuleTester.d.ts +154 -0
  162. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Scope.d.ts +44 -0
  163. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/SourceCode.d.ts +342 -0
  164. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/index.d.ts +10 -0
  165. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Definition.d.ts +19 -0
  166. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Options.d.ts +15 -0
  167. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/PatternVisitor.d.ts +25 -0
  168. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Reference.d.ts +28 -0
  169. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Referencer.d.ts +55 -0
  170. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Scope.d.ts +103 -0
  171. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/ScopeManager.d.ts +50 -0
  172. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Variable.d.ts +17 -0
  173. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/analyze.d.ts +16 -0
  174. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/index.d.ts +11 -0
  175. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-estree.d.ts +3 -0
  176. package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts +1131 -25
  177. package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts.map +1 -1
  178. package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.js.map +1 -1
  179. package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts +15 -137
  180. package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map +1 -1
  181. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/CLIEngine.d.ts.map +1 -1
  182. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/CLIEngine.js +1 -0
  183. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/CLIEngine.js.map +1 -1
  184. package/node_modules/@typescript-eslint/utils/package.json +5 -5
  185. package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/get-keys.d.ts +4 -0
  186. package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/index.d.ts +3 -0
  187. package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/visitor-keys.d.ts +6 -0
  188. package/node_modules/@typescript-eslint/visitor-keys/package.json +3 -3
  189. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ export * from './eslint-utils';
2
+ export * from './helpers';
3
+ export * from './misc';
4
+ export * from './predicates';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { TSESTree } from '../ts-estree';
2
+ declare const LINEBREAK_MATCHER: RegExp;
3
+ /**
4
+ * Determines whether two adjacent tokens are on the same line
5
+ */
6
+ declare function isTokenOnSameLine(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token): boolean;
7
+ export { isTokenOnSameLine, LINEBREAK_MATCHER };
8
+ //# sourceMappingURL=misc.d.ts.map
@@ -0,0 +1,58 @@
1
+ import { TSESTree } from '../ts-estree';
2
+ declare const isOptionalChainPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.PunctuatorToken & {
3
+ value: "?.";
4
+ };
5
+ declare const isNotOptionalChainPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.BooleanToken | TSESTree.BlockComment | TSESTree.LineComment | TSESTree.IdentifierToken | TSESTree.JSXIdentifierToken | TSESTree.JSXTextToken | TSESTree.KeywordToken | TSESTree.NullToken | TSESTree.NumericToken | TSESTree.PunctuatorToken | TSESTree.RegularExpressionToken | TSESTree.StringToken | TSESTree.TemplateToken;
6
+ declare const isNonNullAssertionPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.PunctuatorToken & {
7
+ value: "!";
8
+ };
9
+ declare const isNotNonNullAssertionPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.BooleanToken | TSESTree.BlockComment | TSESTree.LineComment | TSESTree.IdentifierToken | TSESTree.JSXIdentifierToken | TSESTree.JSXTextToken | TSESTree.KeywordToken | TSESTree.NullToken | TSESTree.NumericToken | TSESTree.PunctuatorToken | TSESTree.RegularExpressionToken | TSESTree.StringToken | TSESTree.TemplateToken;
10
+ /**
11
+ * Returns true if and only if the node represents: foo?.() or foo.bar?.()
12
+ */
13
+ declare const isOptionalCallExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.CallExpression & {
14
+ optional: boolean;
15
+ };
16
+ /**
17
+ * Returns true if and only if the node represents logical OR
18
+ */
19
+ declare const isLogicalOrOperator: (node: TSESTree.Node | null | undefined) => node is TSESTree.LogicalExpression & Partial<TSESTree.LogicalExpression>;
20
+ /**
21
+ * Checks if a node is a type assertion:
22
+ * ```
23
+ * x as foo
24
+ * <foo>x
25
+ * ```
26
+ */
27
+ declare const isTypeAssertion: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSAsExpression | TSESTree.TSTypeAssertion;
28
+ declare const isVariableDeclarator: (node: TSESTree.Node | null | undefined) => node is TSESTree.VariableDeclarator;
29
+ declare const isFunction: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression;
30
+ declare const isFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName;
31
+ declare const isFunctionOrFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName;
32
+ declare const isTSFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSFunctionType;
33
+ declare const isTSConstructorType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSConstructorType;
34
+ declare const isClassOrTypeElement: (node: TSESTree.Node | null | undefined) => node is TSESTree.FunctionExpression | TSESTree.MethodDefinitionComputedName | TSESTree.MethodDefinitionNonComputedName | TSESTree.PropertyDefinitionComputedName | TSESTree.PropertyDefinitionNonComputedName | TSESTree.TSAbstractMethodDefinitionComputedName | TSESTree.TSAbstractMethodDefinitionNonComputedName | TSESTree.TSAbstractPropertyDefinitionComputedName | TSESTree.TSAbstractPropertyDefinitionNonComputedName | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSIndexSignature | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName | TSESTree.TSPropertySignatureComputedName | TSESTree.TSPropertySignatureNonComputedName;
35
+ /**
36
+ * Checks if a node is a constructor method.
37
+ */
38
+ declare const isConstructor: (node: TSESTree.Node | null | undefined) => node is (TSESTree.MethodDefinitionComputedName & Partial<TSESTree.MethodDefinitionComputedName>) | (TSESTree.MethodDefinitionNonComputedName & Partial<TSESTree.MethodDefinitionNonComputedName>);
39
+ /**
40
+ * Checks if a node is a setter method.
41
+ */
42
+ declare function isSetter(node: TSESTree.Node | undefined): node is (TSESTree.MethodDefinition | TSESTree.Property) & {
43
+ kind: 'set';
44
+ };
45
+ declare const isIdentifier: (node: TSESTree.Node | null | undefined) => node is TSESTree.Identifier;
46
+ /**
47
+ * Checks if a node represents an `await …` expression.
48
+ */
49
+ declare const isAwaitExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.AwaitExpression;
50
+ /**
51
+ * Checks if a possible token is the `await` keyword.
52
+ */
53
+ declare const isAwaitKeyword: (token: TSESTree.Token | null | undefined) => token is TSESTree.IdentifierToken & {
54
+ value: "await";
55
+ };
56
+ declare const isLoop: (node: TSESTree.Node | null | undefined) => node is TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.WhileStatement;
57
+ export { isAwaitExpression, isAwaitKeyword, isConstructor, isClassOrTypeElement, isFunction, isFunctionOrFunctionType, isFunctionType, isIdentifier, isLoop, isLogicalOrOperator, isNonNullAssertionPunctuator, isNotNonNullAssertionPunctuator, isNotOptionalChainPunctuator, isOptionalChainPunctuator, isOptionalCallExpression, isSetter, isTSConstructorType, isTSFunctionType, isTypeAssertion, isVariableDeclarator, };
58
+ //# sourceMappingURL=predicates.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { RuleCreateFunction, RuleModule } from '../ts-eslint';
2
+ /**
3
+ * Uses type inference to fetch the TOptions type from the given RuleModule
4
+ */
5
+ declare type InferOptionsTypeFromRule<T> = T extends RuleModule<infer _TMessageIds, infer TOptions> ? TOptions : T extends RuleCreateFunction<infer _TMessageIds, infer TOptions> ? TOptions : unknown;
6
+ /**
7
+ * Uses type inference to fetch the TMessageIds type from the given RuleModule
8
+ */
9
+ declare type InferMessageIdsTypeFromRule<T> = T extends RuleModule<infer TMessageIds, infer _TOptions> ? TMessageIds : T extends RuleCreateFunction<infer TMessageIds, infer _TOptions> ? TMessageIds : unknown;
10
+ export { InferOptionsTypeFromRule, InferMessageIdsTypeFromRule };
11
+ //# sourceMappingURL=InferTypesFromRule.d.ts.map
@@ -0,0 +1,35 @@
1
+ import { RuleMetaData, RuleMetaDataDocs, RuleListener, RuleContext, RuleModule } from '../ts-eslint/Rule';
2
+ export declare type NamedCreateRuleMetaDocs = Pick<RuleMetaDataDocs, Exclude<keyof RuleMetaDataDocs, 'url'>>;
3
+ export declare type NamedCreateRuleMeta<TMessageIds extends string> = {
4
+ docs: NamedCreateRuleMetaDocs;
5
+ } & Pick<RuleMetaData<TMessageIds>, Exclude<keyof RuleMetaData<TMessageIds>, 'docs'>>;
6
+ export interface RuleCreateAndOptions<TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends RuleListener> {
7
+ create: (context: Readonly<RuleContext<TMessageIds, TOptions>>, optionsWithDefault: Readonly<TOptions>) => TRuleListener;
8
+ defaultOptions: Readonly<TOptions>;
9
+ }
10
+ export interface RuleWithMeta<TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends RuleListener> extends RuleCreateAndOptions<TOptions, TMessageIds, TRuleListener> {
11
+ meta: RuleMetaData<TMessageIds>;
12
+ }
13
+ export interface RuleWithMetaAndName<TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends RuleListener> extends RuleCreateAndOptions<TOptions, TMessageIds, TRuleListener> {
14
+ meta: NamedCreateRuleMeta<TMessageIds>;
15
+ name: string;
16
+ }
17
+ /**
18
+ * Creates reusable function to create rules with default options and docs URLs.
19
+ *
20
+ * @param urlCreator Creates a documentation URL for a given rule name.
21
+ * @returns Function to create a rule with the docs URL format.
22
+ */
23
+ export declare function RuleCreator(urlCreator: (ruleName: string) => string): <TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends RuleListener = RuleListener>({ name, meta, ...rule }: Readonly<RuleWithMetaAndName<TOptions, TMessageIds, TRuleListener>>) => RuleModule<TMessageIds, TOptions, TRuleListener>;
24
+ export declare namespace RuleCreator {
25
+ var withoutDocs: typeof createRule;
26
+ }
27
+ /**
28
+ * Creates a well-typed TSESLint custom ESLint rule without a docs URL.
29
+ *
30
+ * @returns Well-typed TSESLint custom ESLint rule.
31
+ * @remarks It is generally better to provide a docs URL function to RuleCreator.
32
+ */
33
+ declare function createRule<TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends RuleListener = RuleListener>({ create, defaultOptions, meta, }: Readonly<RuleWithMeta<TOptions, TMessageIds, TRuleListener>>): RuleModule<TMessageIds, TOptions, TRuleListener>;
34
+ export {};
35
+ //# sourceMappingURL=RuleCreator.d.ts.map
@@ -0,0 +1,18 @@
1
+ import * as TSESLint from '../ts-eslint';
2
+ declare const parser = "@typescript-eslint/parser";
3
+ declare type RuleTesterConfig = Pick<TSESLint.RuleTesterConfig, Exclude<keyof TSESLint.RuleTesterConfig, 'parser'>> & {
4
+ parser: typeof parser;
5
+ };
6
+ declare class RuleTester extends TSESLint.RuleTester {
7
+ private "RuleTester.#private";
8
+ constructor(options: RuleTesterConfig);
9
+ private getFilename;
10
+ run<TMessageIds extends string, TOptions extends Readonly<unknown[]>>(name: string, rule: TSESLint.RuleModule<TMessageIds, TOptions>, testsReadonly: TSESLint.RunTests<TMessageIds, TOptions>): void;
11
+ }
12
+ /**
13
+ * Simple no-op tag to mark code samples as "should not format with prettier"
14
+ * for the internal/plugin-test-formatting lint rule
15
+ */
16
+ declare function noFormat(strings: TemplateStringsArray, ...keys: string[]): string;
17
+ export { noFormat, RuleTester };
18
+ //# sourceMappingURL=RuleTester.d.ts.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Pure function - doesn't mutate either parameter!
3
+ * Uses the default options and overrides with the options provided by the user
4
+ * @param defaultOptions the defaults
5
+ * @param userOptions the user opts
6
+ * @returns the options with defaults
7
+ */
8
+ declare function applyDefault<TUser extends readonly unknown[], TDefault extends TUser>(defaultOptions: Readonly<TDefault>, userOptions: Readonly<TUser> | null): TDefault;
9
+ export { applyDefault };
10
+ //# sourceMappingURL=applyDefault.d.ts.map
@@ -0,0 +1,24 @@
1
+ import { ValidTestCase, InvalidTestCase } from '../ts-eslint';
2
+ /**
3
+ * Converts a batch of single line tests into a number of separate test cases.
4
+ * This makes it easier to write tests which use the same options.
5
+ *
6
+ * Why wouldn't you just leave them as one test?
7
+ * Because it makes the test error messages harder to decipher.
8
+ * This way each line will fail separately, instead of them all failing together.
9
+ */
10
+ declare function batchedSingleLineTests<TOptions extends Readonly<unknown[]>>(test: ValidTestCase<TOptions>): ValidTestCase<TOptions>[];
11
+ /**
12
+ * Converts a batch of single line tests into a number of separate test cases.
13
+ * This makes it easier to write tests which use the same options.
14
+ *
15
+ * Why wouldn't you just leave them as one test?
16
+ * Because it makes the test error messages harder to decipher.
17
+ * This way each line will fail separately, instead of them all failing together.
18
+ *
19
+ * Make sure you have your line numbers correct for error reporting, as it will match
20
+ * the line numbers up with the split tests!
21
+ */
22
+ declare function batchedSingleLineTests<TMessageIds extends string, TOptions extends Readonly<unknown[]>>(test: InvalidTestCase<TMessageIds, TOptions>): InvalidTestCase<TMessageIds, TOptions>[];
23
+ export { batchedSingleLineTests };
24
+ //# sourceMappingURL=batchedSingleLineTests.d.ts.map
@@ -0,0 +1,17 @@
1
+ declare type ObjectLike<T = unknown> = Record<string, T>;
2
+ /**
3
+ * Check if the variable contains an object strictly rejecting arrays
4
+ * @param obj an object
5
+ * @returns `true` if obj is an object
6
+ */
7
+ declare function isObjectNotArray<T extends ObjectLike>(obj: unknown | unknown[]): obj is T;
8
+ /**
9
+ * Pure function - doesn't mutate either parameter!
10
+ * Merges two objects together deeply, overwriting the properties in first with the properties in second
11
+ * @param first The first object
12
+ * @param second The second object
13
+ * @returns a new object
14
+ */
15
+ export declare function deepMerge(first?: ObjectLike, second?: ObjectLike): Record<string, unknown>;
16
+ export { isObjectNotArray };
17
+ //# sourceMappingURL=deepMerge.d.ts.map
@@ -0,0 +1,8 @@
1
+ import * as TSESLint from '../ts-eslint';
2
+ import { ParserServices } from '../ts-estree';
3
+ /**
4
+ * Try to retrieve typescript parser service from context
5
+ */
6
+ declare function getParserServices<TMessageIds extends string, TOptions extends readonly unknown[]>(context: Readonly<TSESLint.RuleContext<TMessageIds, TOptions>>, allowWithoutFullTypeInformation?: boolean): ParserServices;
7
+ export { getParserServices };
8
+ //# sourceMappingURL=getParserServices.d.ts.map
@@ -0,0 +1,9 @@
1
+ export * from './applyDefault';
2
+ export * from './batchedSingleLineTests';
3
+ export * from './getParserServices';
4
+ export * from './InferTypesFromRule';
5
+ export * from './RuleCreator';
6
+ export * from './RuleTester';
7
+ export * from './deepMerge';
8
+ export * from './nullThrows';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A set of common reasons for calling nullThrows
3
+ */
4
+ declare const NullThrowsReasons: {
5
+ readonly MissingParent: "Expected node to have a parent.";
6
+ readonly MissingToken: (token: string, thing: string) => string;
7
+ };
8
+ /**
9
+ * Assert that a value must not be null or undefined.
10
+ * This is a nice explicit alternative to the non-null assertion operator.
11
+ */
12
+ declare function nullThrows<T>(value: T | null | undefined, message: string): T;
13
+ export { nullThrows, NullThrowsReasons };
14
+ //# sourceMappingURL=nullThrows.d.ts.map
@@ -0,0 +1,8 @@
1
+ import * as ASTUtils from './ast-utils';
2
+ import * as ESLintUtils from './eslint-utils';
3
+ import * as JSONSchema from './json-schema';
4
+ import * as TSESLint from './ts-eslint';
5
+ import * as TSESLintScope from './ts-eslint-scope';
6
+ export { ASTUtils, ESLintUtils, JSONSchema, TSESLint, TSESLintScope };
7
+ export * from './ts-estree';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { JSONSchema4, JSONSchema4Type, JSONSchema4TypeName, JSONSchema4Version, JSONSchema6, JSONSchema6Definition, JSONSchema6Type, JSONSchema6TypeName, JSONSchema6Version, JSONSchema7, JSONSchema7Array, JSONSchema7Definition, JSONSchema7Type, JSONSchema7TypeName, JSONSchema7Version, ValidationError, ValidationResult, } from 'json-schema';
2
+ //# sourceMappingURL=json-schema.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { TSESTree, AST_TOKEN_TYPES } from '../ts-estree';
2
+ declare namespace AST {
3
+ type TokenType = AST_TOKEN_TYPES;
4
+ type Token = TSESTree.Token;
5
+ type SourceLocation = TSESTree.SourceLocation;
6
+ type Range = TSESTree.Range;
7
+ }
8
+ export { AST };
9
+ //# sourceMappingURL=AST.d.ts.map
@@ -0,0 +1,137 @@
1
+ import { Linter } from './Linter';
2
+ import { RuleListener, RuleMetaData, RuleModule } from './Rule';
3
+ declare namespace CLIEngine {
4
+ interface Options {
5
+ allowInlineConfig?: boolean;
6
+ baseConfig?: false | {
7
+ [name: string]: unknown;
8
+ };
9
+ cache?: boolean;
10
+ cacheFile?: string;
11
+ cacheLocation?: string;
12
+ configFile?: string;
13
+ cwd?: string;
14
+ envs?: string[];
15
+ errorOnUnmatchedPattern?: boolean;
16
+ extensions?: string[];
17
+ fix?: boolean;
18
+ globals?: string[];
19
+ ignore?: boolean;
20
+ ignorePath?: string;
21
+ ignorePattern?: string | string[];
22
+ useEslintrc?: boolean;
23
+ parser?: string;
24
+ parserOptions?: Linter.ParserOptions;
25
+ plugins?: string[];
26
+ resolvePluginsRelativeTo?: string;
27
+ rules?: {
28
+ [name: string]: Linter.RuleLevel | Linter.RuleLevelAndOptions;
29
+ };
30
+ rulePaths?: string[];
31
+ reportUnusedDisableDirectives?: boolean;
32
+ }
33
+ interface LintResult {
34
+ filePath: string;
35
+ messages: Linter.LintMessage[];
36
+ errorCount: number;
37
+ warningCount: number;
38
+ fixableErrorCount: number;
39
+ fixableWarningCount: number;
40
+ output?: string;
41
+ source?: string;
42
+ }
43
+ interface LintReport {
44
+ results: LintResult[];
45
+ errorCount: number;
46
+ warningCount: number;
47
+ fixableErrorCount: number;
48
+ fixableWarningCount: number;
49
+ usedDeprecatedRules: DeprecatedRuleUse[];
50
+ }
51
+ interface DeprecatedRuleUse {
52
+ ruleId: string;
53
+ replacedBy: string[];
54
+ }
55
+ interface LintResultData<TMessageIds extends string> {
56
+ rulesMeta: {
57
+ [ruleId: string]: RuleMetaData<TMessageIds>;
58
+ };
59
+ }
60
+ type Formatter = <TMessageIds extends string>(results: LintResult[], data?: LintResultData<TMessageIds>) => string;
61
+ }
62
+ /**
63
+ * The underlying utility that runs the ESLint command line interface. This object will read the filesystem for
64
+ * configuration and file information but will not output any results. Instead, it allows you direct access to the
65
+ * important information so you can deal with the output yourself.
66
+ * @deprecated use the ESLint class instead
67
+ */
68
+ declare const CLIEngine: {
69
+ new (options: CLIEngine.Options): {
70
+ /**
71
+ * Add a plugin by passing its configuration
72
+ * @param name Name of the plugin.
73
+ * @param pluginObject Plugin configuration object.
74
+ */
75
+ addPlugin(name: string, pluginObject: Linter.Plugin): void;
76
+ /**
77
+ * Executes the current configuration on an array of file and directory names.
78
+ * @param patterns An array of file and directory names.
79
+ * @returns The results for all files that were linted.
80
+ */
81
+ executeOnFiles(patterns: string[]): CLIEngine.LintReport;
82
+ /**
83
+ * Executes the current configuration on text.
84
+ * @param text A string of JavaScript code to lint.
85
+ * @param filename An optional string representing the texts filename.
86
+ * @param warnIgnored Always warn when a file is ignored
87
+ * @returns The results for the linting.
88
+ */
89
+ executeOnText(text: string, filename?: string, warnIgnored?: boolean): CLIEngine.LintReport;
90
+ /**
91
+ * Returns a configuration object for the given file based on the CLI options.
92
+ * This is the same logic used by the ESLint CLI executable to determine configuration for each file it processes.
93
+ * @param filePath The path of the file to retrieve a config object for.
94
+ * @returns A configuration object for the file.
95
+ */
96
+ getConfigForFile(filePath: string): Linter.Config;
97
+ /**
98
+ * Returns the formatter representing the given format.
99
+ * @param format The name of the format to load or the path to a custom formatter.
100
+ * @returns The formatter function.
101
+ */
102
+ getFormatter(format?: string): CLIEngine.Formatter;
103
+ /**
104
+ * Checks if a given path is ignored by ESLint.
105
+ * @param filePath The path of the file to check.
106
+ * @returns Whether or not the given path is ignored.
107
+ */
108
+ isPathIgnored(filePath: string): boolean;
109
+ /**
110
+ * Resolves the patterns passed into `executeOnFiles()` into glob-based patterns for easier handling.
111
+ * @param patterns The file patterns passed on the command line.
112
+ * @returns The equivalent glob patterns.
113
+ */
114
+ resolveFileGlobPatterns(patterns: string[]): string[];
115
+ getRules<TMessageIds extends string = string, TOptions extends readonly unknown[] = unknown[], TRuleListener extends RuleListener = RuleListener>(): Map<string, RuleModule<TMessageIds, TOptions, TRuleListener>>;
116
+ };
117
+ /**
118
+ * Returns results that only contains errors.
119
+ * @param results The results to filter.
120
+ * @returns The filtered results.
121
+ */
122
+ getErrorResults(results: CLIEngine.LintResult[]): CLIEngine.LintResult[];
123
+ /**
124
+ * Returns the formatter representing the given format or null if the `format` is not a string.
125
+ * @param format The name of the format to load or the path to a custom formatter.
126
+ * @returns The formatter function.
127
+ */
128
+ getFormatter(format?: string): CLIEngine.Formatter;
129
+ /**
130
+ * Outputs fixes from the given results to files.
131
+ * @param report The report object created by CLIEngine.
132
+ */
133
+ outputFixes(report: CLIEngine.LintReport): void;
134
+ version: string;
135
+ } | undefined;
136
+ export { CLIEngine };
137
+ //# sourceMappingURL=CLIEngine.d.ts.map