/
index.d.ts
56 lines (53 loc) · 1.53 KB
/
index.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
declare namespace npmLint {
type DependencyRules = {
checkLatest?: boolean;
allowLatest?: boolean;
sources: string[];
};
type ScriptRules = {
allow?: string[];
};
type Package = {
name: string;
version: string;
scripts?: object;
dependencies?: object;
devDependencies?: object;
npmLint?: {
options?: object;
rules?: {
scripts?: ScriptRules;
properties?: string[];
dependencies?: DependencyRules;
};
};
};
interface ContextObject {
workingDirectory: string;
package?: Package;
packageFile?: string;
npmLintFile?: string;
options?: object;
rules?: {
scripts?: ScriptRules;
properties?: string[];
dependencies?: DependencyRules;
};
errors: {
insert: (value: { message: string }) => void;
on: (event: string, cb: (result: Error) => void) => void;
};
warnings: {
insert: (value: { message: string }) => void;
on: (event: string, cb: (result: Error) => void) => void;
};
info: {
insert: (value: { message: string }) => void;
on: (event: string, cb: (result: Error) => void) => void;
};
important: {
insert: (value: { message: string }) => void;
on: (event: string, cb: (result: Error) => void) => void;
};
}
}