|
1 |
| -import { type TSESLint, type TSESTree } from '@typescript-eslint/utils'; |
2 |
| - |
3 |
| -declare module '@typescript-eslint/utils/dist/ts-eslint/Rule' { |
4 |
| - export interface RuleContext< |
5 |
| - // eslint-disable-next-line @typescript-eslint/no-unused-vars |
6 |
| - TMessageIds extends string, |
7 |
| - // eslint-disable-next-line @typescript-eslint/no-unused-vars |
8 |
| - TOptions extends readonly unknown[], |
9 |
| - > { |
10 |
| - /** |
11 |
| - * The filename associated with the source. |
12 |
| - */ |
13 |
| - filename: string; |
14 |
| - |
15 |
| - /** |
16 |
| - * A SourceCode object that you can use to work with the source that |
17 |
| - * was passed to ESLint. |
18 |
| - */ |
19 |
| - sourceCode: Readonly<TSESLint.SourceCode>; |
20 |
| - } |
21 |
| -} |
22 |
| - |
23 |
| -declare module '@typescript-eslint/utils/dist/ts-eslint/SourceCode' { |
24 |
| - export interface SourceCode { |
25 |
| - /** |
26 |
| - * Returns the scope of the given node. |
27 |
| - * This information can be used track references to variables. |
28 |
| - * @since 8.37.0 |
29 |
| - */ |
30 |
| - getScope(node: TSESTree.Node): TSESLint.Scope.Scope; |
31 |
| - /** |
32 |
| - * Returns an array of the ancestors of the given node, starting at |
33 |
| - * the root of the AST and continuing through the direct parent of the current node. |
34 |
| - * This array does not include the currently-traversed node itself. |
35 |
| - * @since 8.38.0 |
36 |
| - */ |
37 |
| - getAncestors(node: TSESTree.Node): TSESTree.Node[]; |
38 |
| - /** |
39 |
| - * Returns a list of variables declared by the given node. |
40 |
| - * This information can be used to track references to variables. |
41 |
| - * @since 8.38.0 |
42 |
| - */ |
43 |
| - getDeclaredVariables( |
44 |
| - node: TSESTree.Node |
45 |
| - ): readonly TSESLint.Scope.Variable[]; |
46 |
| - } |
47 |
| -} |
| 1 | +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; |
48 | 2 |
|
49 | 3 | /* istanbul ignore next */
|
50 | 4 | export const getFilename = (
|
|
0 commit comments