1 | import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils';
|
2 | import { Rule } from './types';
|
3 | export interface IssueLocation {
|
4 | column: number;
|
5 | line: number;
|
6 | endColumn: number;
|
7 | endLine: number;
|
8 | message?: string;
|
9 | }
|
10 | export interface EncodedMessage {
|
11 | message: string;
|
12 | cost?: number;
|
13 | secondaryLocations: IssueLocation[];
|
14 | }
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | export declare function getMainFunctionTokenLocation(fn: TSESTree.FunctionLike, parent: TSESTree.Node | undefined, context: Rule.RuleContext): TSESTree.SourceLocation;
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | export declare function report(context: Rule.RuleContext, reportDescriptor: Rule.ReportDescriptor, secondaryLocations?: IssueLocation[], cost?: number): void;
|
28 |
|
29 |
|
30 |
|
31 | export declare function issueLocation(startLoc: TSESTree.SourceLocation, endLoc?: TSESTree.SourceLocation, message?: string): IssueLocation;
|
32 | export declare function toEncodedMessage(message: string, secondaryLocationsHolder: Array<TSESLint.AST.Token | TSESTree.Node>, secondaryMessages?: string[], cost?: number): string;
|
33 | export declare function toSecondaryLocation(locationHolder: TSESLint.AST.Token | TSESTree.Node, message?: string): IssueLocation;
|
34 | export declare function getFirstTokenAfter(node: TSESTree.Node, context: Rule.RuleContext): TSESLint.AST.Token | null;
|
35 | export declare function getFirstToken(node: TSESTree.Node, context: Rule.RuleContext): TSESLint.AST.Token;
|