forked from aladdin-add/eslint-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shims.d.ts
30 lines (24 loc) · 964 Bytes
/
shims.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
declare module 'eslint-rule-composer' {
import * as estree from 'estree'
import * as eslint from 'eslint'
interface Problem {
node: estree.Node | null
message: string
messageId: string | null
data: object | null
loc: eslint.AST.SourceLocation
fix?: (fixer: eslint.Rule.RuleFixer) => (eslint.Rule.Fix | null)
}
interface Metadata {
sourceCode: eslint.SourceCode
settings?: object
options: any[]
filename: string
}
interface Predicate<T> {
(problem: Problem, metadata: Metadata): T
}
export function mapReports(rule: eslint.Rule.RuleModule, predicate: Predicate<Problem>): eslint.Rule.RuleModule
export function filterReports(rule: eslint.Rule.RuleModule, predicate: Predicate<boolean>): eslint.Rule.RuleModule
export function joinReports(rules: eslint.Rule.RuleModule[]): eslint.Rule.RuleModule
}