File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,24 @@ interface LinterResult {
20
20
warningCount : number ;
21
21
}
22
22
23
+ type Severity = 'error' | 'warning' | 'off' ;
24
+
25
+ type RuleConfig = Severity | [ Severity , ...any [ ] ] ;
26
+
27
+ type RuleSet = Record < string , RuleConfig > ;
28
+
29
+ interface NpmPackageJsonLintConfig {
30
+ extends ?: string | string [ ] ;
31
+ rules ?: RuleSet ;
32
+ overrides : {
33
+ patterns : string [ ] ;
34
+ rules : RuleSet ;
35
+ } [ ] ;
36
+ }
37
+
23
38
type NpmPackageJsonLintOptions = {
24
39
cwd ?: string ;
25
- config ?: object ;
40
+ config ?: NpmPackageJsonLintConfig ;
26
41
configFile ?: string ;
27
42
configBaseDirectory ?: string ;
28
43
quiet ?: boolean ;
@@ -51,5 +66,7 @@ export {
51
66
export type {
52
67
FileLintResult ,
53
68
LinterResult ,
54
- LintIssue
69
+ LintIssue ,
70
+ Severity ,
71
+ NpmPackageJsonLintConfig
55
72
} ;
You can’t perform that action at this time.
0 commit comments