@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.
- package/package.json +1 -6
- package/src/ast/ast-utils.d.ts +1 -1
- package/src/ast/module-binding.d.ts +1 -1
- package/src/ast/spellings.d.ts +1 -1
- package/src/ast/static-expression.d.ts +1 -1
- package/src/ast/type-syntax.d.ts +1 -1
- package/src/ast-node-types.d.ts +1 -1
- package/src/index.d.ts +6 -3
- package/src/resolver/dependency-analysis.d.ts +29 -0
- package/src/resolver/dependency-analysis.js +1 -1
- package/src/rule-creation/browser-escape-hatch-rule.d.ts +1 -1
- package/src/rule-creation/connection-config.d.ts +1 -1
- package/src/rule-creation/driver-origin.d.ts +1 -1
- package/src/rule-creation/generated-file.d.ts +1 -1
- package/src/rule-creation/hardcoded-credentials-rule.d.ts +9 -2
- package/src/rule-creation/mass-assignment-rule.d.ts +9 -2
- package/src/rule-creation/message-source.d.ts +1 -1
- package/src/rule-creation/minified-file.d.ts +1 -1
- package/src/rule-creation/mock-context.d.ts +1 -1
- package/src/rule-creation/module-evidence.d.ts +1 -1
- package/src/rule-creation/raw-identifier-rule.d.ts +9 -2
- package/src/rule-creation/request-source.d.ts +1 -1
- package/src/rule-creation/require-tls-rule.d.ts +8 -2
- package/src/rule-creation/rule-creator.d.ts +1 -1
- package/src/rule-creation/rule-creator.js +1 -1
- package/src/rule-creation/sdk-api-key-rule.d.ts +1 -1
- package/src/rule-creation/sdk-flow.d.ts +1 -1
- package/src/rule-creation/sql-injection-rule.d.ts +8 -2
- package/src/rule-creation/sql-position.d.ts +1 -1
- package/src/rule-creation/sql-safety.d.ts +1 -1
- package/src/rule-creation/system-prompt-injection-rule.d.ts +1 -1
- package/src/rule-creation/unscoped-mutation-rule.d.ts +9 -2
- package/src/rule-creation/value-follow.d.ts +1 -1
- package/src/security/security-utils.d.ts +1 -1
- package/src/types/estree/project-service/createProjectService.d.ts +67 -0
- package/src/types/estree/project-service/index.d.ts +3 -0
- package/src/types/estree/scope-manager/ScopeManager.d.ts +77 -0
- package/src/types/estree/scope-manager/analyze.d.ts +55 -0
- package/src/types/estree/scope-manager/definition/CatchClauseDefinition.d.ts +10 -0
- package/src/types/estree/scope-manager/definition/ClassNameDefinition.d.ts +10 -0
- package/src/types/estree/scope-manager/definition/Definition.d.ts +14 -0
- package/src/types/estree/scope-manager/definition/DefinitionBase.d.ts +35 -0
- package/src/types/estree/scope-manager/definition/DefinitionType.d.ts +15 -0
- package/src/types/estree/scope-manager/definition/FunctionNameDefinition.d.ts +10 -0
- package/src/types/estree/scope-manager/definition/ImplicitGlobalVariableDefinition.d.ts +10 -0
- package/src/types/estree/scope-manager/definition/ImportBindingDefinition.d.ts +11 -0
- package/src/types/estree/scope-manager/definition/ParameterDefinition.d.ts +14 -0
- package/src/types/estree/scope-manager/definition/TSEnumMemberDefinition.d.ts +10 -0
- package/src/types/estree/scope-manager/definition/TSEnumNameDefinition.d.ts +10 -0
- package/src/types/estree/scope-manager/definition/TSModuleNameDefinition.d.ts +10 -0
- package/src/types/estree/scope-manager/definition/TypeDefinition.d.ts +10 -0
- package/src/types/estree/scope-manager/definition/VariableDefinition.d.ts +10 -0
- package/src/types/estree/scope-manager/definition/index.d.ts +15 -0
- package/src/types/estree/scope-manager/index.d.ts +10 -0
- package/src/types/estree/scope-manager/referencer/PatternVisitor.d.ts +16 -0
- package/src/types/estree/scope-manager/referencer/Reference.d.ts +88 -0
- package/src/types/estree/scope-manager/referencer/Referencer.d.ts +28 -0
- package/src/types/estree/scope-manager/referencer/Visitor.d.ts +13 -0
- package/src/types/estree/scope-manager/referencer/VisitorBase.d.ts +22 -0
- package/src/types/estree/scope-manager/referencer/index.d.ts +3 -0
- package/src/types/estree/scope-manager/scope/BlockScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/CatchScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/ClassFieldInitializerScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/ClassScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/ClassStaticBlockScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/ConditionalTypeScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/ForScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/FunctionExpressionNameScope.d.ts +11 -0
- package/src/types/estree/scope-manager/scope/FunctionScope.d.ts +12 -0
- package/src/types/estree/scope-manager/scope/FunctionTypeScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/GlobalScope.d.ts +18 -0
- package/src/types/estree/scope-manager/scope/MappedTypeScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/ModuleScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/Scope.d.ts +21 -0
- package/src/types/estree/scope-manager/scope/ScopeBase.d.ts +91 -0
- package/src/types/estree/scope-manager/scope/ScopeType.d.ts +22 -0
- package/src/types/estree/scope-manager/scope/SwitchScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/TSEnumScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/TSModuleScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/TypeScope.d.ts +10 -0
- package/src/types/estree/scope-manager/scope/WithScope.d.ts +11 -0
- package/src/types/estree/scope-manager/scope/index.d.ts +22 -0
- package/src/types/estree/scope-manager/variable/ESLintScopeVariable.d.ts +34 -0
- package/src/types/estree/scope-manager/variable/ImplicitLibVariable.d.ts +29 -0
- package/src/types/estree/scope-manager/variable/Variable.d.ts +18 -0
- package/src/types/estree/scope-manager/variable/VariableBase.d.ts +44 -0
- package/src/types/estree/scope-manager/variable/index.d.ts +8 -0
- package/src/types/estree/types/generated/ast-spec.d.ts +2215 -0
- package/src/types/estree/types/index.d.ts +6 -0
- package/src/types/estree/types/lib.d.ts +3 -0
- package/src/types/estree/types/parser-options.d.ts +83 -0
- package/src/types/estree/types/ts-estree.d.ts +190 -0
- package/src/types/estree/typescript-estree/clear-caches.d.ts +11 -0
- package/src/types/estree/typescript-estree/create-program/getScriptKind.d.ts +5 -0
- package/src/types/estree/typescript-estree/create-program/shared.d.ts +29 -0
- package/src/types/estree/typescript-estree/create-program/useProvidedPrograms.d.ts +13 -0
- package/src/types/estree/typescript-estree/getModifiers.d.ts +5 -0
- package/src/types/estree/typescript-estree/index.d.ts +16 -0
- package/src/types/estree/typescript-estree/node-utils.d.ts +191 -0
- package/src/types/estree/typescript-estree/parseSettings/ExpiringCache.d.ts +17 -0
- package/src/types/estree/typescript-estree/parseSettings/candidateTSConfigRootDirs.d.ts +5 -0
- package/src/types/estree/typescript-estree/parseSettings/index.d.ts +128 -0
- package/src/types/estree/typescript-estree/parser-options.d.ts +220 -0
- package/src/types/estree/typescript-estree/parser.d.ts +19 -0
- package/src/types/estree/typescript-estree/simple-traverse.d.ts +13 -0
- package/src/types/estree/typescript-estree/ts-estree/estree-to-ts-node-types.d.ts +180 -0
- package/src/types/estree/typescript-estree/ts-estree/index.d.ts +5 -0
- package/src/types/estree/typescript-estree/ts-estree/ts-nodes.d.ts +19 -0
- package/src/types/estree/typescript-estree/version-check.d.ts +6 -0
- package/src/types/estree/typescript-estree/version.d.ts +3 -0
- package/src/types/estree/typescript-estree/withoutProjectParserOptions.d.ts +11 -0
- package/src/types/estree/utils/ast-utils/eslint-utils/PatternMatcher.d.ts +49 -0
- package/src/types/estree/utils/ast-utils/eslint-utils/ReferenceTracker.d.ts +73 -0
- package/src/types/estree/utils/ast-utils/eslint-utils/astUtilities.d.ts +85 -0
- package/src/types/estree/utils/ast-utils/eslint-utils/index.d.ts +7 -0
- package/src/types/estree/utils/ast-utils/eslint-utils/predicates.d.ts +33 -0
- package/src/types/estree/utils/ast-utils/eslint-utils/scopeAnalysis.d.ts +18 -0
- package/src/types/estree/utils/ast-utils/helpers.d.ts +20 -0
- package/src/types/estree/utils/ast-utils/index.d.ts +6 -0
- package/src/types/estree/utils/ast-utils/misc.d.ts +12 -0
- package/src/types/estree/utils/ast-utils/predicates.d.ts +70 -0
- package/src/types/estree/utils/eslint-utils/InferTypesFromRule.d.ts +11 -0
- package/src/types/estree/utils/eslint-utils/RuleCreator.d.ts +34 -0
- package/src/types/estree/utils/eslint-utils/applyDefault.d.ts +10 -0
- package/src/types/estree/utils/eslint-utils/deepMerge.d.ts +16 -0
- package/src/types/estree/utils/eslint-utils/getParserServices.d.ts +24 -0
- package/src/types/estree/utils/eslint-utils/index.d.ts +8 -0
- package/src/types/estree/utils/eslint-utils/nullThrows.d.ts +14 -0
- package/src/types/estree/utils/index.d.ts +8 -0
- package/src/types/estree/utils/json-schema.d.ts +389 -0
- package/src/types/estree/utils/ts-eslint/AST.d.ts +10 -0
- package/src/types/estree/utils/ts-eslint/Config.d.ts +293 -0
- package/src/types/estree/utils/ts-eslint/ESLint.d.ts +9 -0
- package/src/types/estree/utils/ts-eslint/Linter.d.ts +257 -0
- package/src/types/estree/utils/ts-eslint/Parser.d.ts +96 -0
- package/src/types/estree/utils/ts-eslint/ParserOptions.d.ts +3 -0
- package/src/types/estree/utils/ts-eslint/Processor.d.ts +65 -0
- package/src/types/estree/utils/ts-eslint/Rule.d.ts +633 -0
- package/src/types/estree/utils/ts-eslint/RuleTester.d.ts +185 -0
- package/src/types/estree/utils/ts-eslint/Scope.d.ts +44 -0
- package/src/types/estree/utils/ts-eslint/SourceCode.d.ts +356 -0
- package/src/types/estree/utils/ts-eslint/eslint/ESLintShared.d.ts +383 -0
- package/src/types/estree/utils/ts-eslint/eslint/FlatESLint.d.ts +89 -0
- package/src/types/estree/utils/ts-eslint/eslint/LegacyESLint.d.ts +74 -0
- package/src/types/estree/utils/ts-eslint/index.d.ts +13 -0
- package/src/types/estree/utils/ts-estree.d.ts +5 -0
- package/src/types/estree/utils/ts-utils/NoInfer.d.ts +11 -0
- package/src/types/estree/utils/ts-utils/index.d.ts +4 -0
- package/src/types/estree/utils/ts-utils/isArray.d.ts +3 -0
- package/src/types/estree/visitor-keys/get-keys.d.ts +4 -0
- package/src/types/estree/visitor-keys/index.d.ts +4 -0
- package/src/types/estree/visitor-keys/visitor-keys.d.ts +4 -0
- package/src/types/meta-augmentation.d.ts +1 -1
- package/src/types/type-utils.d.ts +1 -1
|
@@ -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 ClassFieldInitializerScope extends ScopeBase<ScopeType.classFieldInitializer, TSESTree.Expression, Scope> {
|
|
9
|
+
constructor(scopeManager: ScopeManager, upperScope: ClassFieldInitializerScope['upper'], block: ClassFieldInitializerScope['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 ClassScope extends ScopeBase<ScopeType.class, TSESTree.ClassDeclaration | TSESTree.ClassExpression, Scope> {
|
|
9
|
+
constructor(scopeManager: ScopeManager, upperScope: ClassScope['upper'], block: ClassScope['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 ClassStaticBlockScope extends ScopeBase<ScopeType.classStaticBlock, TSESTree.StaticBlock, Scope> {
|
|
9
|
+
constructor(scopeManager: ScopeManager, upperScope: ClassStaticBlockScope['upper'], block: ClassStaticBlockScope['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 ConditionalTypeScope extends ScopeBase<ScopeType.conditionalType, TSESTree.TSConditionalType, Scope> {
|
|
9
|
+
constructor(scopeManager: ScopeManager, upperScope: ConditionalTypeScope['upper'], block: ConditionalTypeScope['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 ForScope extends ScopeBase<ScopeType.for, TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement, Scope> {
|
|
9
|
+
constructor(scopeManager: ScopeManager, upperScope: ForScope['upper'], block: ForScope['block']);
|
|
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 type { ScopeManager } from '../ScopeManager';
|
|
5
|
+
import type { Scope } from './Scope';
|
|
6
|
+
import { ScopeBase } from './ScopeBase';
|
|
7
|
+
import { ScopeType } from './ScopeType';
|
|
8
|
+
export declare class FunctionExpressionNameScope extends ScopeBase<ScopeType.functionExpressionName, TSESTree.FunctionExpression, Scope> {
|
|
9
|
+
readonly functionExpressionScope: true;
|
|
10
|
+
constructor(scopeManager: ScopeManager, upperScope: FunctionExpressionNameScope['upper'], block: FunctionExpressionNameScope['block']);
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 { Reference } from '../referencer/Reference';
|
|
5
|
+
import type { ScopeManager } from '../ScopeManager';
|
|
6
|
+
import type { Variable } from '../variable';
|
|
7
|
+
import type { Scope } from './Scope';
|
|
8
|
+
import { ScopeBase } from './ScopeBase';
|
|
9
|
+
import { ScopeType } from './ScopeType';
|
|
10
|
+
export declare class FunctionScope extends ScopeBase<ScopeType.function, TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.Program | TSESTree.TSDeclareFunction | TSESTree.TSEmptyBodyFunctionExpression, Scope> {
|
|
11
|
+
constructor(scopeManager: ScopeManager, upperScope: FunctionScope['upper'], block: FunctionScope['block'], isMethodDefinition: boolean);
|
|
12
|
+
}
|
|
@@ -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 FunctionTypeScope extends ScopeBase<ScopeType.functionType, TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSFunctionType | TSESTree.TSMethodSignature, Scope> {
|
|
9
|
+
constructor(scopeManager: ScopeManager, upperScope: FunctionTypeScope['upper'], block: FunctionTypeScope['block']);
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { ImplicitLibVariableOptions } from '../variable';
|
|
6
|
+
import type { Scope } from './Scope';
|
|
7
|
+
import { ScopeBase } from './ScopeBase';
|
|
8
|
+
import { ScopeType } from './ScopeType';
|
|
9
|
+
export declare class GlobalScope extends ScopeBase<ScopeType.global, TSESTree.Program,
|
|
10
|
+
/**
|
|
11
|
+
* The global scope has no parent.
|
|
12
|
+
*/
|
|
13
|
+
null> {
|
|
14
|
+
constructor(scopeManager: ScopeManager, block: GlobalScope['block']);
|
|
15
|
+
addVariables(names: string[]): void;
|
|
16
|
+
close(scopeManager: ScopeManager): Scope | null;
|
|
17
|
+
defineImplicitVariable(name: string, options: ImplicitLibVariableOptions): void;
|
|
18
|
+
}
|
|
@@ -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 MappedTypeScope extends ScopeBase<ScopeType.mappedType, TSESTree.TSMappedType, Scope> {
|
|
9
|
+
constructor(scopeManager: ScopeManager, upperScope: MappedTypeScope['upper'], block: MappedTypeScope['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 ModuleScope extends ScopeBase<ScopeType.module, TSESTree.Program, Scope> {
|
|
9
|
+
constructor(scopeManager: ScopeManager, upperScope: ModuleScope['upper'], block: ModuleScope['block']);
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { BlockScope } from './BlockScope';
|
|
4
|
+
import type { CatchScope } from './CatchScope';
|
|
5
|
+
import type { ClassFieldInitializerScope } from './ClassFieldInitializerScope';
|
|
6
|
+
import type { ClassScope } from './ClassScope';
|
|
7
|
+
import type { ClassStaticBlockScope } from './ClassStaticBlockScope';
|
|
8
|
+
import type { ConditionalTypeScope } from './ConditionalTypeScope';
|
|
9
|
+
import type { ForScope } from './ForScope';
|
|
10
|
+
import type { FunctionExpressionNameScope } from './FunctionExpressionNameScope';
|
|
11
|
+
import type { FunctionScope } from './FunctionScope';
|
|
12
|
+
import type { FunctionTypeScope } from './FunctionTypeScope';
|
|
13
|
+
import type { GlobalScope } from './GlobalScope';
|
|
14
|
+
import type { MappedTypeScope } from './MappedTypeScope';
|
|
15
|
+
import type { ModuleScope } from './ModuleScope';
|
|
16
|
+
import type { SwitchScope } from './SwitchScope';
|
|
17
|
+
import type { TSEnumScope } from './TSEnumScope';
|
|
18
|
+
import type { TSModuleScope } from './TSModuleScope';
|
|
19
|
+
import type { TypeScope } from './TypeScope';
|
|
20
|
+
import type { WithScope } from './WithScope';
|
|
21
|
+
export type Scope = BlockScope | CatchScope | ClassFieldInitializerScope | ClassScope | ClassStaticBlockScope | ConditionalTypeScope | ForScope | FunctionExpressionNameScope | FunctionScope | FunctionTypeScope | GlobalScope | MappedTypeScope | ModuleScope | SwitchScope | TSEnumScope | TSModuleScope | TypeScope | WithScope;
|
|
@@ -0,0 +1,91 @@
|
|
|
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 { Definition } from '../definition';
|
|
5
|
+
import type { ReferenceImplicitGlobal } from '../referencer/Reference';
|
|
6
|
+
import type { ScopeManager } from '../ScopeManager';
|
|
7
|
+
import type { FunctionScope } from './FunctionScope';
|
|
8
|
+
import type { GlobalScope } from './GlobalScope';
|
|
9
|
+
import type { ModuleScope } from './ModuleScope';
|
|
10
|
+
import type { Scope } from './Scope';
|
|
11
|
+
import type { TSModuleScope } from './TSModuleScope';
|
|
12
|
+
import { Reference, ReferenceFlag } from '../referencer/Reference';
|
|
13
|
+
import { Variable } from '../variable';
|
|
14
|
+
import { ScopeType } from './ScopeType';
|
|
15
|
+
type VariableScope = FunctionScope | GlobalScope | ModuleScope | TSModuleScope;
|
|
16
|
+
export declare abstract class ScopeBase<Type extends ScopeType, Block extends TSESTree.Node, Upper extends Scope | null> {
|
|
17
|
+
/**
|
|
18
|
+
* A unique ID for this instance - primarily used to help debugging and testing
|
|
19
|
+
*/
|
|
20
|
+
readonly $id: number;
|
|
21
|
+
/**
|
|
22
|
+
* The AST node which created this scope.
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
readonly block: Block;
|
|
26
|
+
/**
|
|
27
|
+
* The array of child scopes. This does not include grandchild scopes.
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
readonly childScopes: Scope[];
|
|
31
|
+
/**
|
|
32
|
+
* Whether this scope is created by a FunctionExpression.
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
readonly functionExpressionScope: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Whether 'use strict' is in effect in this scope.
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
isStrict: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* List of {@link Reference}s that are left to be resolved (i.e. which
|
|
43
|
+
* need to be linked to the variable they refer to).
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* Any variable {@link Reference} found in this scope.
|
|
47
|
+
* This includes occurrences of local variables as well as variables from parent scopes (including the global scope).
|
|
48
|
+
* For local variables this also includes defining occurrences (like in a 'var' statement).
|
|
49
|
+
* In a 'function' scope this does not include the occurrences of the formal parameter in the parameter list.
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
readonly references: Reference[];
|
|
53
|
+
/**
|
|
54
|
+
* The map from variable names to variable objects.
|
|
55
|
+
* @public
|
|
56
|
+
*/
|
|
57
|
+
readonly set: Map<string, Variable>;
|
|
58
|
+
/**
|
|
59
|
+
* The {@link Reference}s that are not resolved with this scope.
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
through: Reference[];
|
|
63
|
+
readonly type: Type;
|
|
64
|
+
/**
|
|
65
|
+
* Reference to the parent {@link Scope}.
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
readonly upper: Upper;
|
|
69
|
+
/**
|
|
70
|
+
* The scoped {@link Variable}s of this scope.
|
|
71
|
+
* In the case of a 'function' scope this includes the automatic argument `arguments` as its first element, as well
|
|
72
|
+
* as all further formal arguments.
|
|
73
|
+
* This does not include variables which are defined in child scopes.
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
readonly variables: Variable[];
|
|
77
|
+
readonly variableScope: VariableScope;
|
|
78
|
+
constructor(scopeManager: ScopeManager, type: Type, upperScope: Upper, block: Block, isMethodDefinition: boolean);
|
|
79
|
+
close(_scopeManager: ScopeManager): Scope | null;
|
|
80
|
+
shouldStaticallyClose(): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* To override by function scopes.
|
|
83
|
+
* References in default parameters isn't resolved to variables which are in their function body.
|
|
84
|
+
*/
|
|
85
|
+
defineIdentifier(node: TSESTree.Identifier, def: Definition): void;
|
|
86
|
+
defineLiteralIdentifier(node: TSESTree.StringLiteral, def: Definition): void;
|
|
87
|
+
referenceDualValueType(node: TSESTree.Identifier): void;
|
|
88
|
+
referenceType(node: TSESTree.Identifier): void;
|
|
89
|
+
referenceValue(node: TSESTree.Identifier | TSESTree.JSXIdentifier, assign?: ReferenceFlag, writeExpr?: TSESTree.Expression | null, maybeImplicitGlobal?: ReferenceImplicitGlobal | null, init?: boolean): void;
|
|
90
|
+
}
|
|
91
|
+
export {};
|
|
@@ -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
|
+
export declare enum ScopeType {
|
|
4
|
+
block = "block",
|
|
5
|
+
catch = "catch",
|
|
6
|
+
class = "class",
|
|
7
|
+
classFieldInitializer = "class-field-initializer",
|
|
8
|
+
classStaticBlock = "class-static-block",
|
|
9
|
+
conditionalType = "conditionalType",
|
|
10
|
+
for = "for",
|
|
11
|
+
function = "function",
|
|
12
|
+
functionExpressionName = "function-expression-name",
|
|
13
|
+
functionType = "functionType",
|
|
14
|
+
global = "global",
|
|
15
|
+
mappedType = "mappedType",
|
|
16
|
+
module = "module",
|
|
17
|
+
switch = "switch",
|
|
18
|
+
tsEnum = "tsEnum",
|
|
19
|
+
tsModule = "tsModule",
|
|
20
|
+
type = "type",
|
|
21
|
+
with = "with"
|
|
22
|
+
}
|
|
@@ -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 SwitchScope extends ScopeBase<ScopeType.switch, TSESTree.SwitchStatement, Scope> {
|
|
9
|
+
constructor(scopeManager: ScopeManager, upperScope: SwitchScope['upper'], block: SwitchScope['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 TSEnumScope extends ScopeBase<ScopeType.tsEnum, TSESTree.TSEnumDeclaration, Scope> {
|
|
9
|
+
constructor(scopeManager: ScopeManager, upperScope: TSEnumScope['upper'], block: TSEnumScope['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 TSModuleScope extends ScopeBase<ScopeType.tsModule, TSESTree.TSModuleDeclaration, Scope> {
|
|
9
|
+
constructor(scopeManager: ScopeManager, upperScope: TSModuleScope['upper'], block: TSModuleScope['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 TypeScope extends ScopeBase<ScopeType.type, TSESTree.TSInterfaceDeclaration | TSESTree.TSTypeAliasDeclaration, Scope> {
|
|
9
|
+
constructor(scopeManager: ScopeManager, upperScope: TypeScope['upper'], block: TypeScope['block']);
|
|
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 type { ScopeManager } from '../ScopeManager';
|
|
5
|
+
import type { Scope } from './Scope';
|
|
6
|
+
import { ScopeBase } from './ScopeBase';
|
|
7
|
+
import { ScopeType } from './ScopeType';
|
|
8
|
+
export declare class WithScope extends ScopeBase<ScopeType.with, TSESTree.WithStatement, Scope> {
|
|
9
|
+
constructor(scopeManager: ScopeManager, upperScope: WithScope['upper'], block: WithScope['block']);
|
|
10
|
+
close(scopeManager: ScopeManager): Scope | null;
|
|
11
|
+
}
|
|
@@ -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
|
+
export * from './BlockScope';
|
|
4
|
+
export * from './CatchScope';
|
|
5
|
+
export * from './ClassFieldInitializerScope';
|
|
6
|
+
export * from './ClassScope';
|
|
7
|
+
export * from './ClassStaticBlockScope';
|
|
8
|
+
export * from './ConditionalTypeScope';
|
|
9
|
+
export * from './ForScope';
|
|
10
|
+
export * from './FunctionExpressionNameScope';
|
|
11
|
+
export * from './FunctionScope';
|
|
12
|
+
export * from './FunctionTypeScope';
|
|
13
|
+
export * from './GlobalScope';
|
|
14
|
+
export * from './MappedTypeScope';
|
|
15
|
+
export * from './ModuleScope';
|
|
16
|
+
export * from './Scope';
|
|
17
|
+
export * from './ScopeType';
|
|
18
|
+
export * from './SwitchScope';
|
|
19
|
+
export * from './TSEnumScope';
|
|
20
|
+
export * from './TSModuleScope';
|
|
21
|
+
export * from './TypeScope';
|
|
22
|
+
export * from './WithScope';
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { VariableBase } from './VariableBase';
|
|
5
|
+
/**
|
|
6
|
+
* ESLint defines global variables using the eslint-scope Variable class
|
|
7
|
+
* This is declared here for consumers to use
|
|
8
|
+
*/
|
|
9
|
+
export declare class ESLintScopeVariable extends VariableBase {
|
|
10
|
+
/**
|
|
11
|
+
* Written to by ESLint.
|
|
12
|
+
* If this key exists, this variable is a global variable added by ESLint.
|
|
13
|
+
* If this is `true`, this variable can be assigned arbitrary values.
|
|
14
|
+
* If this is `false`, this variable is readonly.
|
|
15
|
+
*/
|
|
16
|
+
writeable?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Written to by ESLint.
|
|
19
|
+
* This property is undefined if there are no globals comment directives.
|
|
20
|
+
* The array of globals comment directives which defined this global variable in the source code file.
|
|
21
|
+
*/
|
|
22
|
+
eslintExplicitGlobal?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Written to by ESLint.
|
|
25
|
+
* The configured value in config files. This can be different from `variable.writeable` if there are globals comment directives.
|
|
26
|
+
*/
|
|
27
|
+
eslintImplicitGlobalSetting?: 'readonly' | 'writable';
|
|
28
|
+
/**
|
|
29
|
+
* Written to by ESLint.
|
|
30
|
+
* If this key exists, it is a global variable added by ESLint.
|
|
31
|
+
* If `true`, this global variable was defined by a globals comment directive in the source code file.
|
|
32
|
+
*/
|
|
33
|
+
eslintExplicitGlobalComments?: TSESTree.Comment[];
|
|
34
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Scope } from '../scope';
|
|
4
|
+
import type { Variable } from './Variable';
|
|
5
|
+
import { ESLintScopeVariable } from './ESLintScopeVariable';
|
|
6
|
+
export interface ImplicitLibVariableOptions {
|
|
7
|
+
readonly eslintImplicitGlobalSetting?: ESLintScopeVariable['eslintImplicitGlobalSetting'];
|
|
8
|
+
readonly isTypeVariable?: boolean;
|
|
9
|
+
readonly isValueVariable?: boolean;
|
|
10
|
+
readonly writeable?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface LibDefinition {
|
|
13
|
+
libs: readonly LibDefinition[];
|
|
14
|
+
variables: readonly [string, ImplicitLibVariableOptions][];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* An variable implicitly defined by the TS Lib
|
|
18
|
+
*/
|
|
19
|
+
export declare class ImplicitLibVariable extends ESLintScopeVariable implements Variable {
|
|
20
|
+
/**
|
|
21
|
+
* `true` if the variable is valid in a type context, false otherwise
|
|
22
|
+
*/
|
|
23
|
+
readonly isTypeVariable: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* `true` if the variable is valid in a value context, false otherwise
|
|
26
|
+
*/
|
|
27
|
+
readonly isValueVariable: boolean;
|
|
28
|
+
constructor(scope: Scope, name: string, { eslintImplicitGlobalSetting, isTypeVariable, isValueVariable, writeable, }: ImplicitLibVariableOptions);
|
|
29
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { VariableBase } from './VariableBase';
|
|
4
|
+
/**
|
|
5
|
+
* A Variable represents a locally scoped identifier. These include arguments to functions.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Variable extends VariableBase {
|
|
8
|
+
/**
|
|
9
|
+
* `true` if the variable is valid in a type context, false otherwise
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
get isTypeVariable(): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* `true` if the variable is valid in a value context, false otherwise
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
get isValueVariable(): boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { Definition } from '../definition';
|
|
5
|
+
import type { Reference } from '../referencer/Reference';
|
|
6
|
+
import type { Scope } from '../scope';
|
|
7
|
+
export declare class VariableBase {
|
|
8
|
+
/**
|
|
9
|
+
* A unique ID for this instance - primarily used to help debugging and testing
|
|
10
|
+
*/
|
|
11
|
+
readonly $id: number;
|
|
12
|
+
/**
|
|
13
|
+
* The array of the definitions of this variable.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
readonly defs: Definition[];
|
|
17
|
+
/**
|
|
18
|
+
* True if the variable is considered used for the purposes of `no-unused-vars`, false otherwise.
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
eslintUsed: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The array of `Identifier` nodes which define this variable.
|
|
24
|
+
* If this variable is redeclared, this array includes two or more nodes.
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
readonly identifiers: TSESTree.Identifier[];
|
|
28
|
+
/**
|
|
29
|
+
* The variable name, as given in the source code.
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
readonly name: string;
|
|
33
|
+
/**
|
|
34
|
+
* List of {@link Reference} of this variable (excluding parameter entries) in its defining scope and all nested scopes.
|
|
35
|
+
* For defining occurrences only see {@link Variable#defs}.
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
readonly references: Reference[];
|
|
39
|
+
/**
|
|
40
|
+
* Reference to the enclosing Scope.
|
|
41
|
+
*/
|
|
42
|
+
readonly scope: Scope;
|
|
43
|
+
constructor(name: string, scope: Scope);
|
|
44
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
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 { ESLintScopeVariable } from './ESLintScopeVariable';
|
|
4
|
+
import type { Variable } from './Variable';
|
|
5
|
+
export { ESLintScopeVariable } from './ESLintScopeVariable';
|
|
6
|
+
export { ImplicitLibVariable, type ImplicitLibVariableOptions, type LibDefinition, } from './ImplicitLibVariable';
|
|
7
|
+
export { Variable } from './Variable';
|
|
8
|
+
export type ScopeVariable = ESLintScopeVariable | Variable;
|