@interlace/eslint-devkit 2.1.2 → 2.2.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 (154) hide show
  1. package/package.json +1 -6
  2. package/src/ast/ast-utils.d.ts +1 -1
  3. package/src/ast/module-binding.d.ts +1 -1
  4. package/src/ast/spellings.d.ts +1 -1
  5. package/src/ast/static-expression.d.ts +1 -1
  6. package/src/ast/type-syntax.d.ts +1 -1
  7. package/src/ast-node-types.d.ts +1 -1
  8. package/src/index.d.ts +6 -3
  9. package/src/resolver/dependency-analysis.d.ts +29 -0
  10. package/src/resolver/dependency-analysis.js +1 -1
  11. package/src/rule-creation/browser-escape-hatch-rule.d.ts +1 -1
  12. package/src/rule-creation/connection-config.d.ts +1 -1
  13. package/src/rule-creation/driver-origin.d.ts +1 -1
  14. package/src/rule-creation/generated-file.d.ts +1 -1
  15. package/src/rule-creation/hardcoded-credentials-rule.d.ts +9 -2
  16. package/src/rule-creation/mass-assignment-rule.d.ts +9 -2
  17. package/src/rule-creation/message-source.d.ts +1 -1
  18. package/src/rule-creation/minified-file.d.ts +1 -1
  19. package/src/rule-creation/mock-context.d.ts +1 -1
  20. package/src/rule-creation/module-evidence.d.ts +1 -1
  21. package/src/rule-creation/raw-identifier-rule.d.ts +9 -2
  22. package/src/rule-creation/request-source.d.ts +1 -1
  23. package/src/rule-creation/require-tls-rule.d.ts +8 -2
  24. package/src/rule-creation/rule-creator.d.ts +1 -1
  25. package/src/rule-creation/rule-creator.js +1 -1
  26. package/src/rule-creation/sdk-api-key-rule.d.ts +1 -1
  27. package/src/rule-creation/sdk-flow.d.ts +1 -1
  28. package/src/rule-creation/sql-injection-rule.d.ts +8 -2
  29. package/src/rule-creation/sql-position.d.ts +1 -1
  30. package/src/rule-creation/sql-safety.d.ts +1 -1
  31. package/src/rule-creation/system-prompt-injection-rule.d.ts +1 -1
  32. package/src/rule-creation/unscoped-mutation-rule.d.ts +9 -2
  33. package/src/rule-creation/value-follow.d.ts +1 -1
  34. package/src/security/security-utils.d.ts +1 -1
  35. package/src/types/estree/project-service/createProjectService.d.ts +67 -0
  36. package/src/types/estree/project-service/index.d.ts +3 -0
  37. package/src/types/estree/scope-manager/ScopeManager.d.ts +77 -0
  38. package/src/types/estree/scope-manager/analyze.d.ts +55 -0
  39. package/src/types/estree/scope-manager/definition/CatchClauseDefinition.d.ts +10 -0
  40. package/src/types/estree/scope-manager/definition/ClassNameDefinition.d.ts +10 -0
  41. package/src/types/estree/scope-manager/definition/Definition.d.ts +14 -0
  42. package/src/types/estree/scope-manager/definition/DefinitionBase.d.ts +35 -0
  43. package/src/types/estree/scope-manager/definition/DefinitionType.d.ts +15 -0
  44. package/src/types/estree/scope-manager/definition/FunctionNameDefinition.d.ts +10 -0
  45. package/src/types/estree/scope-manager/definition/ImplicitGlobalVariableDefinition.d.ts +10 -0
  46. package/src/types/estree/scope-manager/definition/ImportBindingDefinition.d.ts +11 -0
  47. package/src/types/estree/scope-manager/definition/ParameterDefinition.d.ts +14 -0
  48. package/src/types/estree/scope-manager/definition/TSEnumMemberDefinition.d.ts +10 -0
  49. package/src/types/estree/scope-manager/definition/TSEnumNameDefinition.d.ts +10 -0
  50. package/src/types/estree/scope-manager/definition/TSModuleNameDefinition.d.ts +10 -0
  51. package/src/types/estree/scope-manager/definition/TypeDefinition.d.ts +10 -0
  52. package/src/types/estree/scope-manager/definition/VariableDefinition.d.ts +10 -0
  53. package/src/types/estree/scope-manager/definition/index.d.ts +15 -0
  54. package/src/types/estree/scope-manager/index.d.ts +10 -0
  55. package/src/types/estree/scope-manager/referencer/PatternVisitor.d.ts +16 -0
  56. package/src/types/estree/scope-manager/referencer/Reference.d.ts +88 -0
  57. package/src/types/estree/scope-manager/referencer/Referencer.d.ts +28 -0
  58. package/src/types/estree/scope-manager/referencer/Visitor.d.ts +13 -0
  59. package/src/types/estree/scope-manager/referencer/VisitorBase.d.ts +22 -0
  60. package/src/types/estree/scope-manager/referencer/index.d.ts +3 -0
  61. package/src/types/estree/scope-manager/scope/BlockScope.d.ts +10 -0
  62. package/src/types/estree/scope-manager/scope/CatchScope.d.ts +10 -0
  63. package/src/types/estree/scope-manager/scope/ClassFieldInitializerScope.d.ts +10 -0
  64. package/src/types/estree/scope-manager/scope/ClassScope.d.ts +10 -0
  65. package/src/types/estree/scope-manager/scope/ClassStaticBlockScope.d.ts +10 -0
  66. package/src/types/estree/scope-manager/scope/ConditionalTypeScope.d.ts +10 -0
  67. package/src/types/estree/scope-manager/scope/ForScope.d.ts +10 -0
  68. package/src/types/estree/scope-manager/scope/FunctionExpressionNameScope.d.ts +11 -0
  69. package/src/types/estree/scope-manager/scope/FunctionScope.d.ts +12 -0
  70. package/src/types/estree/scope-manager/scope/FunctionTypeScope.d.ts +10 -0
  71. package/src/types/estree/scope-manager/scope/GlobalScope.d.ts +18 -0
  72. package/src/types/estree/scope-manager/scope/MappedTypeScope.d.ts +10 -0
  73. package/src/types/estree/scope-manager/scope/ModuleScope.d.ts +10 -0
  74. package/src/types/estree/scope-manager/scope/Scope.d.ts +21 -0
  75. package/src/types/estree/scope-manager/scope/ScopeBase.d.ts +91 -0
  76. package/src/types/estree/scope-manager/scope/ScopeType.d.ts +22 -0
  77. package/src/types/estree/scope-manager/scope/SwitchScope.d.ts +10 -0
  78. package/src/types/estree/scope-manager/scope/TSEnumScope.d.ts +10 -0
  79. package/src/types/estree/scope-manager/scope/TSModuleScope.d.ts +10 -0
  80. package/src/types/estree/scope-manager/scope/TypeScope.d.ts +10 -0
  81. package/src/types/estree/scope-manager/scope/WithScope.d.ts +11 -0
  82. package/src/types/estree/scope-manager/scope/index.d.ts +22 -0
  83. package/src/types/estree/scope-manager/variable/ESLintScopeVariable.d.ts +34 -0
  84. package/src/types/estree/scope-manager/variable/ImplicitLibVariable.d.ts +29 -0
  85. package/src/types/estree/scope-manager/variable/Variable.d.ts +18 -0
  86. package/src/types/estree/scope-manager/variable/VariableBase.d.ts +44 -0
  87. package/src/types/estree/scope-manager/variable/index.d.ts +8 -0
  88. package/src/types/estree/types/generated/ast-spec.d.ts +2215 -0
  89. package/src/types/estree/types/index.d.ts +6 -0
  90. package/src/types/estree/types/lib.d.ts +3 -0
  91. package/src/types/estree/types/parser-options.d.ts +83 -0
  92. package/src/types/estree/types/ts-estree.d.ts +190 -0
  93. package/src/types/estree/typescript-estree/clear-caches.d.ts +11 -0
  94. package/src/types/estree/typescript-estree/create-program/getScriptKind.d.ts +5 -0
  95. package/src/types/estree/typescript-estree/create-program/shared.d.ts +29 -0
  96. package/src/types/estree/typescript-estree/create-program/useProvidedPrograms.d.ts +13 -0
  97. package/src/types/estree/typescript-estree/getModifiers.d.ts +5 -0
  98. package/src/types/estree/typescript-estree/index.d.ts +16 -0
  99. package/src/types/estree/typescript-estree/node-utils.d.ts +191 -0
  100. package/src/types/estree/typescript-estree/parseSettings/ExpiringCache.d.ts +17 -0
  101. package/src/types/estree/typescript-estree/parseSettings/candidateTSConfigRootDirs.d.ts +5 -0
  102. package/src/types/estree/typescript-estree/parseSettings/index.d.ts +128 -0
  103. package/src/types/estree/typescript-estree/parser-options.d.ts +220 -0
  104. package/src/types/estree/typescript-estree/parser.d.ts +19 -0
  105. package/src/types/estree/typescript-estree/simple-traverse.d.ts +13 -0
  106. package/src/types/estree/typescript-estree/ts-estree/estree-to-ts-node-types.d.ts +180 -0
  107. package/src/types/estree/typescript-estree/ts-estree/index.d.ts +5 -0
  108. package/src/types/estree/typescript-estree/ts-estree/ts-nodes.d.ts +19 -0
  109. package/src/types/estree/typescript-estree/version-check.d.ts +6 -0
  110. package/src/types/estree/typescript-estree/version.d.ts +3 -0
  111. package/src/types/estree/typescript-estree/withoutProjectParserOptions.d.ts +11 -0
  112. package/src/types/estree/utils/ast-utils/eslint-utils/PatternMatcher.d.ts +49 -0
  113. package/src/types/estree/utils/ast-utils/eslint-utils/ReferenceTracker.d.ts +73 -0
  114. package/src/types/estree/utils/ast-utils/eslint-utils/astUtilities.d.ts +85 -0
  115. package/src/types/estree/utils/ast-utils/eslint-utils/index.d.ts +7 -0
  116. package/src/types/estree/utils/ast-utils/eslint-utils/predicates.d.ts +33 -0
  117. package/src/types/estree/utils/ast-utils/eslint-utils/scopeAnalysis.d.ts +18 -0
  118. package/src/types/estree/utils/ast-utils/helpers.d.ts +20 -0
  119. package/src/types/estree/utils/ast-utils/index.d.ts +6 -0
  120. package/src/types/estree/utils/ast-utils/misc.d.ts +12 -0
  121. package/src/types/estree/utils/ast-utils/predicates.d.ts +70 -0
  122. package/src/types/estree/utils/eslint-utils/InferTypesFromRule.d.ts +11 -0
  123. package/src/types/estree/utils/eslint-utils/RuleCreator.d.ts +34 -0
  124. package/src/types/estree/utils/eslint-utils/applyDefault.d.ts +10 -0
  125. package/src/types/estree/utils/eslint-utils/deepMerge.d.ts +16 -0
  126. package/src/types/estree/utils/eslint-utils/getParserServices.d.ts +24 -0
  127. package/src/types/estree/utils/eslint-utils/index.d.ts +8 -0
  128. package/src/types/estree/utils/eslint-utils/nullThrows.d.ts +14 -0
  129. package/src/types/estree/utils/index.d.ts +8 -0
  130. package/src/types/estree/utils/json-schema.d.ts +389 -0
  131. package/src/types/estree/utils/ts-eslint/AST.d.ts +10 -0
  132. package/src/types/estree/utils/ts-eslint/Config.d.ts +293 -0
  133. package/src/types/estree/utils/ts-eslint/ESLint.d.ts +9 -0
  134. package/src/types/estree/utils/ts-eslint/Linter.d.ts +257 -0
  135. package/src/types/estree/utils/ts-eslint/Parser.d.ts +96 -0
  136. package/src/types/estree/utils/ts-eslint/ParserOptions.d.ts +3 -0
  137. package/src/types/estree/utils/ts-eslint/Processor.d.ts +65 -0
  138. package/src/types/estree/utils/ts-eslint/Rule.d.ts +633 -0
  139. package/src/types/estree/utils/ts-eslint/RuleTester.d.ts +185 -0
  140. package/src/types/estree/utils/ts-eslint/Scope.d.ts +44 -0
  141. package/src/types/estree/utils/ts-eslint/SourceCode.d.ts +356 -0
  142. package/src/types/estree/utils/ts-eslint/eslint/ESLintShared.d.ts +383 -0
  143. package/src/types/estree/utils/ts-eslint/eslint/FlatESLint.d.ts +89 -0
  144. package/src/types/estree/utils/ts-eslint/eslint/LegacyESLint.d.ts +74 -0
  145. package/src/types/estree/utils/ts-eslint/index.d.ts +13 -0
  146. package/src/types/estree/utils/ts-estree.d.ts +5 -0
  147. package/src/types/estree/utils/ts-utils/NoInfer.d.ts +11 -0
  148. package/src/types/estree/utils/ts-utils/index.d.ts +4 -0
  149. package/src/types/estree/utils/ts-utils/isArray.d.ts +3 -0
  150. package/src/types/estree/visitor-keys/get-keys.d.ts +4 -0
  151. package/src/types/estree/visitor-keys/index.d.ts +4 -0
  152. package/src/types/estree/visitor-keys/visitor-keys.d.ts +4 -0
  153. package/src/types/meta-augmentation.d.ts +1 -1
  154. package/src/types/type-utils.d.ts +1 -1
@@ -0,0 +1,67 @@
1
+ // Vendored from @typescript-eslint/project-service@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { ProjectServiceOptions } from '../types/index';
4
+ import type * as ts from 'typescript/lib/tsserverlibrary';
5
+ /**
6
+ * Shortcut type to refer to TypeScript's server ProjectService.
7
+ */
8
+ export type TypeScriptProjectService = ts.server.ProjectService;
9
+ /**
10
+ * A created Project Service instance, as well as metadata on its creation.
11
+ */
12
+ export interface ProjectServiceAndMetadata {
13
+ /**
14
+ * Files allowed to be loaded from the default project, if any were specified.
15
+ */
16
+ allowDefaultProject: string[] | undefined;
17
+ /**
18
+ * The performance.now() timestamp of the last reload of the project service.
19
+ */
20
+ lastReloadTimestamp: number;
21
+ /**
22
+ * The maximum number of files that can be matched by the default project.
23
+ */
24
+ maximumDefaultProjectFileMatchCount: number;
25
+ /**
26
+ * The created TypeScript Project Service instance.
27
+ */
28
+ service: TypeScriptProjectService;
29
+ }
30
+ /**
31
+ * Settings to create a new Project Service instance with {@link createProjectService}.
32
+ */
33
+ export interface CreateProjectServiceSettings {
34
+ /**
35
+ * Granular options to configure the project service.
36
+ */
37
+ options?: ProjectServiceOptions;
38
+ /**
39
+ * How aggressively (and slowly) to parse JSDoc comments.
40
+ */
41
+ jsDocParsingMode?: ts.JSDocParsingMode;
42
+ /**
43
+ * Root directory for the tsconfig.json file, if not the current directory.
44
+ */
45
+ tsconfigRootDir?: string;
46
+ /**
47
+ * Custom project service host.
48
+ *
49
+ * @default `ts.sys` with stub watchers
50
+ */
51
+ host?: Partial<ts.server.ServerHost>;
52
+ }
53
+ /**
54
+ * Creates a new Project Service instance, as well as metadata on its creation.
55
+ * @param settings Settings to create a new Project Service instance.
56
+ * @returns A new Project Service instance, as well as metadata on its creation.
57
+ * @example
58
+ * ```ts
59
+ * import { createProjectService } from './index';
60
+ *
61
+ * const { service } = createProjectService();
62
+ *
63
+ * service.openClientFile('index.ts');
64
+ * ```
65
+ */
66
+ export declare function createProjectService({ host, jsDocParsingMode, options: optionsRaw, tsconfigRootDir, }?: CreateProjectServiceSettings): ProjectServiceAndMetadata;
67
+ export { type ProjectServiceOptions } from '../types/index';
@@ -0,0 +1,3 @@
1
+ // Vendored from @typescript-eslint/project-service@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ export * from './createProjectService';
@@ -0,0 +1,77 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { SourceType, TSESTree } from '../types/index';
4
+ import type { Scope } from './scope';
5
+ import type { Variable } from './variable';
6
+ import { BlockScope, CatchScope, ClassScope, ConditionalTypeScope, ForScope, FunctionExpressionNameScope, FunctionScope, FunctionTypeScope, GlobalScope, MappedTypeScope, ModuleScope, SwitchScope, TSEnumScope, TSModuleScope, TypeScope, WithScope } from './scope';
7
+ import { ClassFieldInitializerScope } from './scope/ClassFieldInitializerScope';
8
+ import { ClassStaticBlockScope } from './scope/ClassStaticBlockScope';
9
+ interface ScopeManagerOptions {
10
+ globalReturn?: boolean;
11
+ impliedStrict?: boolean;
12
+ sourceType?: SourceType;
13
+ }
14
+ /**
15
+ * @see https://eslint.org/docs/latest/developer-guide/scope-manager-interface#scopemanager-interface
16
+ */
17
+ export declare class ScopeManager {
18
+ currentScope: Scope | null;
19
+ readonly declaredVariables: WeakMap<TSESTree.Node, Variable[]>;
20
+ /**
21
+ * The root scope
22
+ */
23
+ globalScope: GlobalScope | null;
24
+ readonly nodeToScope: WeakMap<TSESTree.Node, Scope[]>;
25
+ /**
26
+ * All scopes
27
+ * @public
28
+ */
29
+ readonly scopes: Scope[];
30
+ constructor(options: ScopeManagerOptions);
31
+ isES6(): boolean;
32
+ isGlobalReturn(): boolean;
33
+ isImpliedStrict(): boolean;
34
+ isModule(): boolean;
35
+ isStrictModeSupported(): boolean;
36
+ get variables(): Variable[];
37
+ /**
38
+ * Get the variables that a given AST node defines. The gotten variables' `def[].node`/`def[].parent` property is the node.
39
+ * If the node does not define any variable, this returns an empty array.
40
+ * @param node An AST node to get their variables.
41
+ */
42
+ getDeclaredVariables(node: TSESTree.Node): Variable[];
43
+ /**
44
+ * Get the scope of a given AST node. The gotten scope's `block` property is the node.
45
+ * This method never returns `function-expression-name` scope. If the node does not have their scope, this returns `null`.
46
+ *
47
+ * @param node An AST node to get their scope.
48
+ * @param inner If the node has multiple scopes, this returns the outermost scope normally.
49
+ * If `inner` is `true` then this returns the innermost scope.
50
+ */
51
+ acquire(node: TSESTree.Node, inner?: boolean): Scope | null;
52
+ /**
53
+ * Adds dynamically created globals to the global scope and resolve their references.
54
+ * This method is called by ESLint.
55
+ * @param names Names of the globals to create
56
+ */
57
+ addGlobals(names: string[]): void;
58
+ nestBlockScope(node: BlockScope['block']): BlockScope;
59
+ nestCatchScope(node: CatchScope['block']): CatchScope;
60
+ nestClassFieldInitializerScope(node: ClassFieldInitializerScope['block']): ClassFieldInitializerScope;
61
+ nestClassScope(node: ClassScope['block']): ClassScope;
62
+ nestClassStaticBlockScope(node: ClassStaticBlockScope['block']): ClassStaticBlockScope;
63
+ nestConditionalTypeScope(node: ConditionalTypeScope['block']): ConditionalTypeScope;
64
+ nestForScope(node: ForScope['block']): ForScope;
65
+ nestFunctionExpressionNameScope(node: FunctionExpressionNameScope['block']): FunctionExpressionNameScope;
66
+ nestFunctionScope(node: FunctionScope['block'], isMethodDefinition: boolean): FunctionScope;
67
+ nestFunctionTypeScope(node: FunctionTypeScope['block']): FunctionTypeScope;
68
+ nestGlobalScope(node: GlobalScope['block']): GlobalScope;
69
+ nestMappedTypeScope(node: MappedTypeScope['block']): MappedTypeScope;
70
+ nestModuleScope(node: ModuleScope['block']): ModuleScope;
71
+ nestSwitchScope(node: SwitchScope['block']): SwitchScope;
72
+ nestTSEnumScope(node: TSEnumScope['block']): TSEnumScope;
73
+ nestTSModuleScope(node: TSModuleScope['block']): TSModuleScope;
74
+ nestTypeScope(node: TypeScope['block']): TypeScope;
75
+ nestWithScope(node: WithScope['block']): WithScope;
76
+ }
77
+ export {};
@@ -0,0 +1,55 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { Lib, SourceType, TSESTree } from '../types/index';
4
+ import type { ReferencerOptions } from './referencer';
5
+ import { ScopeManager } from './ScopeManager';
6
+ export interface AnalyzeOptions {
7
+ /**
8
+ * Known visitor keys.
9
+ */
10
+ childVisitorKeys?: ReferencerOptions['childVisitorKeys'];
11
+ /**
12
+ * Whether the whole script is executed under node.js environment.
13
+ * When enabled, the scope manager adds a function scope immediately following the global scope.
14
+ * Defaults to `false`.
15
+ */
16
+ globalReturn?: boolean;
17
+ /**
18
+ * Implied strict mode.
19
+ * Defaults to `false`.
20
+ */
21
+ impliedStrict?: boolean;
22
+ /**
23
+ * The identifier that's used for JSX Element creation (after transpilation).
24
+ * This should not be a member expression - just the root identifier (i.e. use "React" instead of "React.createElement").
25
+ * Defaults to `"React"`.
26
+ */
27
+ jsxPragma?: string | null;
28
+ /**
29
+ * The identifier that's used for JSX fragment elements (after transpilation).
30
+ * If `null`, assumes transpilation will always use a member on `jsxFactory` (i.e. React.Fragment).
31
+ * This should not be a member expression - just the root identifier (i.e. use "h" instead of "h.Fragment").
32
+ * Defaults to `null`.
33
+ */
34
+ jsxFragmentName?: string | null;
35
+ /**
36
+ * The lib used by the project.
37
+ * This automatically defines a type variable for any types provided by the configured TS libs.
38
+ * Defaults to ['esnext'].
39
+ *
40
+ * https://www.typescriptlang.org/tsconfig#lib
41
+ */
42
+ lib?: Lib[];
43
+ /**
44
+ * The source type of the script.
45
+ */
46
+ sourceType?: SourceType;
47
+ /**
48
+ * @deprecated This option never did what it was intended for and will be removed in a future major release.
49
+ */
50
+ emitDecoratorMetadata?: boolean;
51
+ }
52
+ /**
53
+ * Takes an AST and returns the analyzed scopes.
54
+ */
55
+ export declare function analyze(tree: TSESTree.Program, providedOptions?: AnalyzeOptions): ScopeManager;
@@ -0,0 +1,10 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import { DefinitionBase } from './DefinitionBase';
5
+ import { DefinitionType } from './DefinitionType';
6
+ export declare class CatchClauseDefinition extends DefinitionBase<DefinitionType.CatchClause, TSESTree.CatchClause, null, TSESTree.Identifier> {
7
+ readonly isTypeDefinition = false;
8
+ readonly isVariableDefinition = true;
9
+ constructor(name: TSESTree.Identifier, node: CatchClauseDefinition['node']);
10
+ }
@@ -0,0 +1,10 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import { DefinitionBase } from './DefinitionBase';
5
+ import { DefinitionType } from './DefinitionType';
6
+ export declare class ClassNameDefinition extends DefinitionBase<DefinitionType.ClassName, TSESTree.ClassDeclaration | TSESTree.ClassExpression, null, TSESTree.Identifier> {
7
+ readonly isTypeDefinition = true;
8
+ readonly isVariableDefinition = true;
9
+ constructor(name: TSESTree.Identifier, node: ClassNameDefinition['node']);
10
+ }
@@ -0,0 +1,14 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { CatchClauseDefinition } from './CatchClauseDefinition';
4
+ import type { ClassNameDefinition } from './ClassNameDefinition';
5
+ import type { FunctionNameDefinition } from './FunctionNameDefinition';
6
+ import type { ImplicitGlobalVariableDefinition } from './ImplicitGlobalVariableDefinition';
7
+ import type { ImportBindingDefinition } from './ImportBindingDefinition';
8
+ import type { ParameterDefinition } from './ParameterDefinition';
9
+ import type { TSEnumMemberDefinition } from './TSEnumMemberDefinition';
10
+ import type { TSEnumNameDefinition } from './TSEnumNameDefinition';
11
+ import type { TSModuleNameDefinition } from './TSModuleNameDefinition';
12
+ import type { TypeDefinition } from './TypeDefinition';
13
+ import type { VariableDefinition } from './VariableDefinition';
14
+ export type Definition = CatchClauseDefinition | ClassNameDefinition | FunctionNameDefinition | ImplicitGlobalVariableDefinition | ImportBindingDefinition | ParameterDefinition | TSEnumMemberDefinition | TSEnumNameDefinition | TSModuleNameDefinition | TypeDefinition | VariableDefinition;
@@ -0,0 +1,35 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { NodeWithParent, TSESTree } from '../../types/index';
4
+ import type { DefinitionType } from './DefinitionType';
5
+ export declare abstract class DefinitionBase<Type extends DefinitionType, Node extends NodeWithParent, Parent extends TSESTree.Node | null, Name extends TSESTree.Node> {
6
+ /**
7
+ * A unique ID for this instance - primarily used to help debugging and testing
8
+ */
9
+ readonly $id: number;
10
+ readonly type: Type;
11
+ /**
12
+ * The `Identifier` node of this definition
13
+ * @public
14
+ */
15
+ readonly name: Name;
16
+ /**
17
+ * The enclosing node of the name.
18
+ * @public
19
+ */
20
+ readonly node: Node;
21
+ /**
22
+ * the enclosing statement node of the identifier.
23
+ * @public
24
+ */
25
+ readonly parent: Parent;
26
+ constructor(type: Type, name: Name, node: Node, parent: Parent);
27
+ /**
28
+ * `true` if the variable is valid in a type context, false otherwise
29
+ */
30
+ abstract readonly isTypeDefinition: boolean;
31
+ /**
32
+ * `true` if the variable is valid in a value context, false otherwise
33
+ */
34
+ abstract readonly isVariableDefinition: boolean;
35
+ }
@@ -0,0 +1,15 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ export declare enum DefinitionType {
4
+ CatchClause = "CatchClause",
5
+ ClassName = "ClassName",
6
+ FunctionName = "FunctionName",
7
+ ImplicitGlobalVariable = "ImplicitGlobalVariable",
8
+ ImportBinding = "ImportBinding",
9
+ Parameter = "Parameter",
10
+ TSEnumName = "TSEnumName",
11
+ TSEnumMember = "TSEnumMemberName",
12
+ TSModuleName = "TSModuleName",
13
+ Type = "Type",
14
+ Variable = "Variable"
15
+ }
@@ -0,0 +1,10 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import { DefinitionBase } from './DefinitionBase';
5
+ import { DefinitionType } from './DefinitionType';
6
+ export declare class FunctionNameDefinition extends DefinitionBase<DefinitionType.FunctionName, TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.TSDeclareFunction | TSESTree.TSEmptyBodyFunctionExpression, null, TSESTree.Identifier> {
7
+ readonly isTypeDefinition = false;
8
+ readonly isVariableDefinition = true;
9
+ constructor(name: TSESTree.Identifier, node: FunctionNameDefinition['node']);
10
+ }
@@ -0,0 +1,10 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { NodeWithParent, TSESTree } from '../../types/index';
4
+ import { DefinitionBase } from './DefinitionBase';
5
+ import { DefinitionType } from './DefinitionType';
6
+ export declare class ImplicitGlobalVariableDefinition extends DefinitionBase<DefinitionType.ImplicitGlobalVariable, NodeWithParent, null, TSESTree.BindingName> {
7
+ readonly isTypeDefinition = false;
8
+ readonly isVariableDefinition = true;
9
+ constructor(name: TSESTree.BindingName, node: ImplicitGlobalVariableDefinition['node']);
10
+ }
@@ -0,0 +1,11 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import { DefinitionBase } from './DefinitionBase';
5
+ import { DefinitionType } from './DefinitionType';
6
+ export declare class ImportBindingDefinition extends DefinitionBase<DefinitionType.ImportBinding, TSESTree.ImportDefaultSpecifier | TSESTree.ImportNamespaceSpecifier | TSESTree.ImportSpecifier | TSESTree.TSImportEqualsDeclaration, TSESTree.ImportDeclaration | TSESTree.TSImportEqualsDeclaration, TSESTree.Identifier> {
7
+ readonly isTypeDefinition = true;
8
+ readonly isVariableDefinition = true;
9
+ constructor(name: TSESTree.Identifier, node: TSESTree.TSImportEqualsDeclaration, decl: TSESTree.TSImportEqualsDeclaration);
10
+ constructor(name: TSESTree.Identifier, node: Exclude<ImportBindingDefinition['node'], TSESTree.TSImportEqualsDeclaration>, decl: TSESTree.ImportDeclaration);
11
+ }
@@ -0,0 +1,14 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import { DefinitionBase } from './DefinitionBase';
5
+ import { DefinitionType } from './DefinitionType';
6
+ export declare class ParameterDefinition extends DefinitionBase<DefinitionType.Parameter, TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSDeclareFunction | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignature, null, TSESTree.BindingName> {
7
+ /**
8
+ * Whether the parameter definition is a part of a rest parameter.
9
+ */
10
+ readonly isTypeDefinition = false;
11
+ readonly isVariableDefinition = true;
12
+ readonly rest: boolean;
13
+ constructor(name: TSESTree.BindingName, node: ParameterDefinition['node'], rest: boolean);
14
+ }
@@ -0,0 +1,10 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import { DefinitionBase } from './DefinitionBase';
5
+ import { DefinitionType } from './DefinitionType';
6
+ export declare class TSEnumMemberDefinition extends DefinitionBase<DefinitionType.TSEnumMember, TSESTree.TSEnumMember, null, TSESTree.Identifier | TSESTree.StringLiteral> {
7
+ readonly isTypeDefinition = true;
8
+ readonly isVariableDefinition = true;
9
+ constructor(name: TSESTree.Identifier | TSESTree.StringLiteral, node: TSEnumMemberDefinition['node']);
10
+ }
@@ -0,0 +1,10 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import { DefinitionBase } from './DefinitionBase';
5
+ import { DefinitionType } from './DefinitionType';
6
+ export declare class TSEnumNameDefinition extends DefinitionBase<DefinitionType.TSEnumName, TSESTree.TSEnumDeclaration, null, TSESTree.Identifier> {
7
+ readonly isTypeDefinition = true;
8
+ readonly isVariableDefinition = true;
9
+ constructor(name: TSESTree.Identifier, node: TSEnumNameDefinition['node']);
10
+ }
@@ -0,0 +1,10 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import { DefinitionBase } from './DefinitionBase';
5
+ import { DefinitionType } from './DefinitionType';
6
+ export declare class TSModuleNameDefinition extends DefinitionBase<DefinitionType.TSModuleName, TSESTree.TSModuleDeclaration, null, TSESTree.Identifier> {
7
+ readonly isTypeDefinition = true;
8
+ readonly isVariableDefinition = true;
9
+ constructor(name: TSESTree.Identifier, node: TSModuleNameDefinition['node']);
10
+ }
@@ -0,0 +1,10 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import { DefinitionBase } from './DefinitionBase';
5
+ import { DefinitionType } from './DefinitionType';
6
+ export declare class TypeDefinition extends DefinitionBase<DefinitionType.Type, TSESTree.TSInterfaceDeclaration | TSESTree.TSMappedType | TSESTree.TSTypeAliasDeclaration | TSESTree.TSTypeParameter, null, TSESTree.Identifier> {
7
+ readonly isTypeDefinition = true;
8
+ readonly isVariableDefinition = false;
9
+ constructor(name: TSESTree.Identifier, node: TypeDefinition['node']);
10
+ }
@@ -0,0 +1,10 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import { DefinitionBase } from './DefinitionBase';
5
+ import { DefinitionType } from './DefinitionType';
6
+ export declare class VariableDefinition extends DefinitionBase<DefinitionType.Variable, TSESTree.VariableDeclarator, TSESTree.VariableDeclaration, TSESTree.Identifier> {
7
+ readonly isTypeDefinition = false;
8
+ readonly isVariableDefinition = true;
9
+ constructor(name: TSESTree.Identifier, node: VariableDefinition['node'], decl: TSESTree.VariableDeclaration);
10
+ }
@@ -0,0 +1,15 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ export * from './CatchClauseDefinition';
4
+ export * from './ClassNameDefinition';
5
+ export * from './Definition';
6
+ export * from './DefinitionType';
7
+ export * from './FunctionNameDefinition';
8
+ export * from './ImplicitGlobalVariableDefinition';
9
+ export * from './ImportBindingDefinition';
10
+ export * from './ParameterDefinition';
11
+ export * from './TSEnumMemberDefinition';
12
+ export * from './TSEnumNameDefinition';
13
+ export * from './TSModuleNameDefinition';
14
+ export * from './TypeDefinition';
15
+ export * from './VariableDefinition';
@@ -0,0 +1,10 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ export { analyze, type AnalyzeOptions } from './analyze';
4
+ export * from './definition';
5
+ export { PatternVisitor, type PatternVisitorCallback, type PatternVisitorOptions, } from './referencer/PatternVisitor';
6
+ export { Reference } from './referencer/Reference';
7
+ export { Visitor } from './referencer/Visitor';
8
+ export * from './scope';
9
+ export { ScopeManager } from './ScopeManager';
10
+ export * from './variable';
@@ -0,0 +1,16 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import type { VisitorOptions } from './VisitorBase';
5
+ import { VisitorBase } from './VisitorBase';
6
+ export type PatternVisitorCallback = (pattern: TSESTree.Identifier, info: {
7
+ assignments: (TSESTree.AssignmentExpression | TSESTree.AssignmentPattern)[];
8
+ rest: boolean;
9
+ topLevel: boolean;
10
+ }) => void;
11
+ export type PatternVisitorOptions = VisitorOptions;
12
+ export declare class PatternVisitor extends VisitorBase {
13
+ readonly rightHandNodes: TSESTree.Node[];
14
+ constructor(options: PatternVisitorOptions, rootPattern: TSESTree.Node, callback: PatternVisitorCallback);
15
+ static isPattern(node: TSESTree.Node): node is TSESTree.ArrayPattern | TSESTree.AssignmentPattern | TSESTree.Identifier | TSESTree.ObjectPattern | TSESTree.RestElement | TSESTree.SpreadElement;
16
+ }
@@ -0,0 +1,88 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { NodeWithParent, TSESTree } from '../../types/index';
4
+ import type { Scope } from '../scope';
5
+ import type { Variable } from '../variable';
6
+ export declare enum ReferenceFlag {
7
+ Read = 1,
8
+ Write = 2,
9
+ ReadWrite = 3
10
+ }
11
+ export interface ReferenceImplicitGlobal {
12
+ node: NodeWithParent;
13
+ pattern: TSESTree.BindingName;
14
+ ref?: Reference;
15
+ }
16
+ export declare enum ReferenceTypeFlag {
17
+ Value = 1,
18
+ Type = 2
19
+ }
20
+ /**
21
+ * A Reference represents a single occurrence of an identifier in code.
22
+ */
23
+ export declare class Reference {
24
+ /**
25
+ * A unique ID for this instance - primarily used to help debugging and testing
26
+ */
27
+ readonly $id: number;
28
+ /**
29
+ * Reference to the enclosing Scope.
30
+ * @public
31
+ */
32
+ readonly from: Scope;
33
+ /**
34
+ * Identifier syntax node.
35
+ * @public
36
+ */
37
+ readonly identifier: TSESTree.Identifier | TSESTree.JSXIdentifier;
38
+ /**
39
+ * `true` if this writing reference is a variable initializer or a default value.
40
+ * @public
41
+ */
42
+ readonly init?: boolean;
43
+ readonly maybeImplicitGlobal?: ReferenceImplicitGlobal | null;
44
+ /**
45
+ * The {@link Variable} object that this reference refers to. If such variable was not defined, this is `null`.
46
+ * @public
47
+ */
48
+ resolved: Variable | null;
49
+ /**
50
+ * If reference is writeable, this is the node being written to it.
51
+ * @public
52
+ */
53
+ readonly writeExpr?: TSESTree.Node | null;
54
+ constructor(identifier: TSESTree.Identifier | TSESTree.JSXIdentifier, scope: Scope, flag: ReferenceFlag, writeExpr?: TSESTree.Node | null, maybeImplicitGlobal?: ReferenceImplicitGlobal | null, init?: boolean, referenceType?: ReferenceTypeFlag);
55
+ /**
56
+ * True if this reference can reference types
57
+ */
58
+ get isTypeReference(): boolean;
59
+ /**
60
+ * True if this reference can reference values
61
+ */
62
+ get isValueReference(): boolean;
63
+ /**
64
+ * Whether the reference is writeable.
65
+ * @public
66
+ */
67
+ isWrite(): boolean;
68
+ /**
69
+ * Whether the reference is readable.
70
+ * @public
71
+ */
72
+ isRead(): boolean;
73
+ /**
74
+ * Whether the reference is read-only.
75
+ * @public
76
+ */
77
+ isReadOnly(): boolean;
78
+ /**
79
+ * Whether the reference is write-only.
80
+ * @public
81
+ */
82
+ isWriteOnly(): boolean;
83
+ /**
84
+ * Whether the reference is read-write.
85
+ * @public
86
+ */
87
+ isReadWrite(): boolean;
88
+ }
@@ -0,0 +1,28 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { Lib, TSESTree } from '../../types/index';
4
+ import type { Scope } from '../scope';
5
+ import type { ScopeManager } from '../ScopeManager';
6
+ import type { ReferenceImplicitGlobal } from './Reference';
7
+ import type { VisitorOptions } from './Visitor';
8
+ import { Visitor } from './Visitor';
9
+ export interface ReferencerOptions extends VisitorOptions {
10
+ jsxFragmentName: string | null;
11
+ jsxPragma: string | null;
12
+ lib: Lib[];
13
+ }
14
+ export declare class Referencer extends Visitor {
15
+ readonly scopeManager: ScopeManager;
16
+ constructor(options: ReferencerOptions, scopeManager: ScopeManager);
17
+ /**
18
+ * Resolves lib names into a deduplicated set of LibDefinitions,
19
+ * including all transitive dependencies.
20
+ */
21
+ close(node: TSESTree.Node): void;
22
+ currentScope(): Scope;
23
+ currentScope(throwOnNull: true): Scope | null;
24
+ referencingDefaultValue(pattern: TSESTree.Identifier, assignments: (TSESTree.AssignmentExpression | TSESTree.AssignmentPattern)[], maybeImplicitGlobal: ReferenceImplicitGlobal | null, init: boolean): void;
25
+ /**
26
+ * Searches for a variable named "name" in the upper scopes and adds a pseudo-reference from itself to itself
27
+ */
28
+ }
@@ -0,0 +1,13 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import type { PatternVisitorCallback, PatternVisitorOptions } from './PatternVisitor';
5
+ import type { VisitorOptions } from './VisitorBase';
6
+ import { VisitorBase } from './VisitorBase';
7
+ interface VisitPatternOptions extends PatternVisitorOptions {
8
+ processRightHandNodes?: boolean;
9
+ }
10
+ export declare class Visitor extends VisitorBase {
11
+ constructor(optionsOrVisitor: Visitor | VisitorOptions);
12
+ }
13
+ export { VisitorBase, type VisitorOptions } from './VisitorBase';
@@ -0,0 +1,22 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import type { VisitorKeys } from '../../visitor-keys/index';
5
+ export interface VisitorOptions {
6
+ childVisitorKeys?: VisitorKeys | null;
7
+ visitChildrenEvenIfSelectorExists?: boolean;
8
+ }
9
+ export declare abstract class VisitorBase {
10
+ constructor(options: VisitorOptions);
11
+ /**
12
+ * Default method for visiting children.
13
+ * @param node the node whose children should be visited
14
+ * @param excludeArr a list of keys to not visit
15
+ */
16
+ visitChildren<T extends TSESTree.Node>(node: T | null | undefined, excludeArr?: (keyof T)[]): void;
17
+ /**
18
+ * Dispatching node.
19
+ */
20
+ visit(node: TSESTree.Node | null | undefined): void;
21
+ }
22
+ export type { VisitorKeys } from '../../visitor-keys/index';
@@ -0,0 +1,3 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ export { Referencer, type ReferencerOptions } from './Referencer';
@@ -0,0 +1,10 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import type { ScopeManager } from '../ScopeManager';
5
+ import type { Scope } from './Scope';
6
+ import { ScopeBase } from './ScopeBase';
7
+ import { ScopeType } from './ScopeType';
8
+ export declare class BlockScope extends ScopeBase<ScopeType.block, TSESTree.BlockStatement, Scope> {
9
+ constructor(scopeManager: ScopeManager, upperScope: BlockScope['upper'], block: BlockScope['block']);
10
+ }
@@ -0,0 +1,10 @@
1
+ // Vendored from @typescript-eslint/scope-manager@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { TSESTree } from '../../types/index';
4
+ import type { ScopeManager } from '../ScopeManager';
5
+ import type { Scope } from './Scope';
6
+ import { ScopeBase } from './ScopeBase';
7
+ import { ScopeType } from './ScopeType';
8
+ export declare class CatchScope extends ScopeBase<ScopeType.catch, TSESTree.CatchClause, Scope> {
9
+ constructor(scopeManager: ScopeManager, upperScope: CatchScope['upper'], block: CatchScope['block']);
10
+ }