File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ interface LintIssue {
2
+ lintId : string ;
3
+ severity : 'error' | 'warning' ;
4
+ node : 'string' ;
5
+ lintMessage : 'string' ;
6
+ }
7
+
8
+ interface FileLintResult {
9
+ filePath : string ;
10
+ issues : LintIssue [ ] ;
11
+ ignored : boolean ;
12
+ errorCount : number ;
13
+ warningCount : number ;
14
+ }
15
+
16
+ interface LinterResult {
17
+ results : FileLintResult [ ] ;
18
+ ignoreCount : number ;
19
+ errorCount : number ;
20
+ warningCount : number ;
21
+ }
22
+
23
+ type NpmPackageJsonLintOptions = {
24
+ cwd ?: string ;
25
+ config ?: object ;
26
+ configFile : string ;
27
+ configBaseDirectory ?: string ;
28
+ quiet ?: boolean ;
29
+ ignorePath ?: string ;
30
+ fix ?: boolean ;
31
+ } & (
32
+ {
33
+ packageJsonObject : object ,
34
+ packageJsonFilePath ?: string ;
35
+ } |
36
+ {
37
+ patterns : string [ ]
38
+ }
39
+ ) ;
40
+
41
+ declare class NpmPackageJsonLint {
42
+ constructor ( options : NpmPackageJsonLintOptions ) ;
43
+
44
+ lint ( ) : LinterResult ;
45
+ }
46
+
47
+ export {
48
+ FileLintResult ,
49
+ LinterResult ,
50
+ LintIssue ,
51
+ NpmPackageJsonLint
52
+ } ;
Original file line number Diff line number Diff line change 27
27
" CONTRIBUTING.md"
28
28
],
29
29
"main" : " src/api.js" ,
30
+ "types" : " index.d.ts" ,
30
31
"scripts" : {
31
32
"eslint" : " eslint . --format=node_modules/eslint-formatter-pretty" ,
32
33
"npmpackagejsonlint" : " node src/cli.js ./package.json" ,
You can’t perform that action at this time.
0 commit comments