source: frontend/node_modules/@eslint-community/eslint-utils/index.d.ts

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago

Fix frontend appearance

  • Property mode set to 100644
File size: 9.6 KB
Line 
1import * as eslint from 'eslint';
2import { Rule, AST } from 'eslint';
3import * as estree from 'estree';
4
5declare const READ: unique symbol;
6declare const CALL: unique symbol;
7declare const CONSTRUCT: unique symbol;
8declare const ESM: unique symbol;
9declare class ReferenceTracker {
10 constructor(globalScope: Scope$2, options?: {
11 mode?: "legacy" | "strict" | undefined;
12 globalObjectNames?: string[] | undefined;
13 } | undefined);
14 private variableStack;
15 private globalScope;
16 private mode;
17 private globalObjectNames;
18 iterateGlobalReferences<T>(traceMap: TraceMap$2<T>): IterableIterator<TrackedReferences$2<T>>;
19 iterateCjsReferences<T_1>(traceMap: TraceMap$2<T_1>): IterableIterator<TrackedReferences$2<T_1>>;
20 iterateEsmReferences<T_2>(traceMap: TraceMap$2<T_2>): IterableIterator<TrackedReferences$2<T_2>>;
21 iteratePropertyReferences<T_3>(node: Expression, traceMap: TraceMap$2<T_3>): IterableIterator<TrackedReferences$2<T_3>>;
22 private _iterateVariableReferences;
23 private _iteratePropertyReferences;
24 private _iterateLhsReferences;
25 private _iterateImportReferences;
26}
27declare namespace ReferenceTracker {
28 export { READ };
29 export { CALL };
30 export { CONSTRUCT };
31 export { ESM };
32}
33type Scope$2 = eslint.Scope.Scope;
34type Expression = estree.Expression;
35type TraceMap$2<T> = TraceMap$1<T>;
36type TrackedReferences$2<T> = TrackedReferences$1<T>;
37
38type StaticValue$2 = StaticValueProvided$1 | StaticValueOptional$1;
39type StaticValueProvided$1 = {
40 optional?: undefined;
41 value: unknown;
42};
43type StaticValueOptional$1 = {
44 optional?: true;
45 value: undefined;
46};
47type ReferenceTrackerOptions$1 = {
48 globalObjectNames?: string[];
49 mode?: "legacy" | "strict";
50};
51type TraceMap$1<T = unknown> = {
52 [i: string]: TraceMapObject<T>;
53};
54type TraceMapObject<T> = {
55 [i: string]: TraceMapObject<T>;
56 [CALL]?: T;
57 [CONSTRUCT]?: T;
58 [READ]?: T;
59 [ESM]?: boolean;
60};
61type TrackedReferences$1<T> = {
62 info: T;
63 node: Rule.Node;
64 path: string[];
65 type: typeof CALL | typeof CONSTRUCT | typeof READ;
66};
67type HasSideEffectOptions$1 = {
68 considerGetters?: boolean;
69 considerImplicitTypeConversion?: boolean;
70};
71type PunctuatorToken<Value extends string> = AST.Token & {
72 type: "Punctuator";
73 value: Value;
74};
75type ArrowToken$1 = PunctuatorToken<"=>">;
76type CommaToken$1 = PunctuatorToken<",">;
77type SemicolonToken$1 = PunctuatorToken<";">;
78type ColonToken$1 = PunctuatorToken<":">;
79type OpeningParenToken$1 = PunctuatorToken<"(">;
80type ClosingParenToken$1 = PunctuatorToken<")">;
81type OpeningBracketToken$1 = PunctuatorToken<"[">;
82type ClosingBracketToken$1 = PunctuatorToken<"]">;
83type OpeningBraceToken$1 = PunctuatorToken<"{">;
84type ClosingBraceToken$1 = PunctuatorToken<"}">;
85
86declare function findVariable(initialScope: Scope$1, nameOrNode: string | Identifier): Variable | null;
87type Scope$1 = eslint.Scope.Scope;
88type Variable = eslint.Scope.Variable;
89type Identifier = estree.Identifier;
90
91declare function getFunctionHeadLocation(node: FunctionNode$1, sourceCode: SourceCode$2): SourceLocation | null;
92type SourceCode$2 = eslint.SourceCode;
93type FunctionNode$1 = estree.Function;
94type SourceLocation = estree.SourceLocation;
95
96declare function getFunctionNameWithKind(node: FunctionNode, sourceCode?: eslint.SourceCode | undefined): string;
97type FunctionNode = estree.Function;
98
99declare function getInnermostScope(initialScope: Scope, node: Node$4): Scope;
100type Scope = eslint.Scope.Scope;
101type Node$4 = estree.Node;
102
103declare function getPropertyName(node: MemberExpression | MethodDefinition | Property | PropertyDefinition, initialScope?: eslint.Scope.Scope | undefined): string | null | undefined;
104type MemberExpression = estree.MemberExpression;
105type MethodDefinition = estree.MethodDefinition;
106type Property = estree.Property;
107type PropertyDefinition = estree.PropertyDefinition;
108
109declare function getStaticValue(node: Node$3, initialScope?: eslint.Scope.Scope | null | undefined): StaticValue$1 | null;
110type StaticValue$1 = StaticValue$2;
111type Node$3 = estree.Node;
112
113declare function getStringIfConstant(node: Node$2, initialScope?: eslint.Scope.Scope | null | undefined): string | null;
114type Node$2 = estree.Node;
115
116declare function hasSideEffect(node: Node$1, sourceCode: SourceCode$1, options?: HasSideEffectOptions$1 | undefined): boolean;
117type Node$1 = estree.Node;
118type SourceCode$1 = eslint.SourceCode;
119
120declare function isArrowToken(token: CommentOrToken): token is ArrowToken$1;
121declare function isCommaToken(token: CommentOrToken): token is CommaToken$1;
122declare function isSemicolonToken(token: CommentOrToken): token is SemicolonToken$1;
123declare function isColonToken(token: CommentOrToken): token is ColonToken$1;
124declare function isOpeningParenToken(token: CommentOrToken): token is OpeningParenToken$1;
125declare function isClosingParenToken(token: CommentOrToken): token is ClosingParenToken$1;
126declare function isOpeningBracketToken(token: CommentOrToken): token is OpeningBracketToken$1;
127declare function isClosingBracketToken(token: CommentOrToken): token is ClosingBracketToken$1;
128declare function isOpeningBraceToken(token: CommentOrToken): token is OpeningBraceToken$1;
129declare function isClosingBraceToken(token: CommentOrToken): token is ClosingBraceToken$1;
130declare function isCommentToken(token: CommentOrToken): token is estree.Comment;
131declare function isNotArrowToken(arg0: CommentOrToken): boolean;
132declare function isNotCommaToken(arg0: CommentOrToken): boolean;
133declare function isNotSemicolonToken(arg0: CommentOrToken): boolean;
134declare function isNotColonToken(arg0: CommentOrToken): boolean;
135declare function isNotOpeningParenToken(arg0: CommentOrToken): boolean;
136declare function isNotClosingParenToken(arg0: CommentOrToken): boolean;
137declare function isNotOpeningBracketToken(arg0: CommentOrToken): boolean;
138declare function isNotClosingBracketToken(arg0: CommentOrToken): boolean;
139declare function isNotOpeningBraceToken(arg0: CommentOrToken): boolean;
140declare function isNotClosingBraceToken(arg0: CommentOrToken): boolean;
141declare function isNotCommentToken(arg0: CommentOrToken): boolean;
142type Token = eslint.AST.Token;
143type Comment = estree.Comment;
144type CommentOrToken = Comment | Token;
145
146declare function isParenthesized(timesOrNode: Node | number, nodeOrSourceCode: Node | SourceCode, optionalSourceCode?: eslint.SourceCode | undefined): boolean;
147type Node = estree.Node;
148type SourceCode = eslint.SourceCode;
149
150declare class PatternMatcher {
151 constructor(pattern: RegExp, options?: {
152 escaped?: boolean | undefined;
153 } | undefined);
154 execAll(str: string): IterableIterator<RegExpExecArray>;
155 test(str: string): boolean;
156 [Symbol.replace](str: string, replacer: string | ((...strs: string[]) => string)): string;
157}
158
159declare namespace _default {
160 export { CALL };
161 export { CONSTRUCT };
162 export { ESM };
163 export { findVariable };
164 export { getFunctionHeadLocation };
165 export { getFunctionNameWithKind };
166 export { getInnermostScope };
167 export { getPropertyName };
168 export { getStaticValue };
169 export { getStringIfConstant };
170 export { hasSideEffect };
171 export { isArrowToken };
172 export { isClosingBraceToken };
173 export { isClosingBracketToken };
174 export { isClosingParenToken };
175 export { isColonToken };
176 export { isCommaToken };
177 export { isCommentToken };
178 export { isNotArrowToken };
179 export { isNotClosingBraceToken };
180 export { isNotClosingBracketToken };
181 export { isNotClosingParenToken };
182 export { isNotColonToken };
183 export { isNotCommaToken };
184 export { isNotCommentToken };
185 export { isNotOpeningBraceToken };
186 export { isNotOpeningBracketToken };
187 export { isNotOpeningParenToken };
188 export { isNotSemicolonToken };
189 export { isOpeningBraceToken };
190 export { isOpeningBracketToken };
191 export { isOpeningParenToken };
192 export { isParenthesized };
193 export { isSemicolonToken };
194 export { PatternMatcher };
195 export { READ };
196 export { ReferenceTracker };
197}
198
199type StaticValue = StaticValue$2;
200type StaticValueOptional = StaticValueOptional$1;
201type StaticValueProvided = StaticValueProvided$1;
202type ReferenceTrackerOptions = ReferenceTrackerOptions$1;
203type TraceMap<T> = TraceMap$1<T>;
204type TrackedReferences<T> = TrackedReferences$1<T>;
205type HasSideEffectOptions = HasSideEffectOptions$1;
206type ArrowToken = ArrowToken$1;
207type CommaToken = CommaToken$1;
208type SemicolonToken = SemicolonToken$1;
209type ColonToken = ColonToken$1;
210type OpeningParenToken = OpeningParenToken$1;
211type ClosingParenToken = ClosingParenToken$1;
212type OpeningBracketToken = OpeningBracketToken$1;
213type ClosingBracketToken = ClosingBracketToken$1;
214type OpeningBraceToken = OpeningBraceToken$1;
215type ClosingBraceToken = ClosingBraceToken$1;
216
217export { ArrowToken, CALL, CONSTRUCT, ClosingBraceToken, ClosingBracketToken, ClosingParenToken, ColonToken, CommaToken, ESM, HasSideEffectOptions, OpeningBraceToken, OpeningBracketToken, OpeningParenToken, PatternMatcher, READ, ReferenceTracker, ReferenceTrackerOptions, SemicolonToken, StaticValue, StaticValueOptional, StaticValueProvided, TraceMap, TrackedReferences, _default as default, findVariable, getFunctionHeadLocation, getFunctionNameWithKind, getInnermostScope, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isParenthesized, isSemicolonToken };
Note: See TracBrowser for help on using the repository browser.