@@ -8,7 +8,7 @@ function buildIssueJson(message, path) {
8
8
// token)
9
9
var checkName = message . ruleId ;
10
10
if ( message . fatal ) {
11
- checkName = "fatal"
11
+ checkName = "fatal" ;
12
12
}
13
13
14
14
var issue = {
@@ -34,27 +34,27 @@ function buildIssueJson(message, path) {
34
34
}
35
35
36
36
var options = {
37
- extensions : [ ' .js' ] , ignore : true , reset : false , useEslintrc : true
37
+ extensions : [ " .js" ] , ignore : true , reset : false , useEslintrc : true
38
38
} ;
39
- var ignores = [ ]
39
+ var ignores = [ ] ;
40
40
if ( process . env . ENGINE_CONFIG ) {
41
41
var engineConfig = JSON . parse ( process . env . ENGINE_CONFIG ) ;
42
- if ( engineConfig [ ' config' ] ) {
43
- options [ ' configFile' ] = "/code/" + engineConfig [ ' config' ] ;
42
+ if ( engineConfig . config ) {
43
+ options . configFile = "/code/" + engineConfig . config ;
44
44
}
45
- if ( engineConfig [ ' exclude_paths' ] ) {
46
- ignores = engineConfig [ ' exclude_paths' ] ;
45
+ if ( engineConfig . exclude_paths ) {
46
+ ignores = engineConfig . exclude_paths ;
47
47
}
48
- if ( engineConfig [ ' extensions' ] ) {
49
- options [ ' extensions' ] = engineConfig [ ' extensions' ] ;
48
+ if ( engineConfig . extensions ) {
49
+ options . extensions = engineConfig . extensions ;
50
50
}
51
51
}
52
52
var cli = new CLIEngine ( options ) ;
53
53
var report = cli . executeOnFiles ( [ "/code" ] ) ;
54
- report . results . forEach ( function ( result , _ , _ ) {
55
- var path = result . filePath . replace ( / ^ \/ c o d e \/ / , '' ) ;
54
+ report . results . forEach ( function ( result ) {
55
+ var path = result . filePath . replace ( / ^ \/ c o d e \/ / , "" ) ;
56
56
if ( ignores . indexOf ( path ) === - 1 ) {
57
- result . messages . forEach ( function ( message , _ , _ ) {
57
+ result . messages . forEach ( function ( message ) {
58
58
var issueJson = buildIssueJson ( message , path ) ;
59
59
console . log ( issueJson + "\u0000" ) ;
60
60
} ) ;
0 commit comments