File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -60,13 +60,27 @@ function getHistoryCommits(from, to) {
60
60
} )
61
61
}
62
62
63
+ function getOptsFromConfig ( config ) {
64
+ return {
65
+ parserOpts :
66
+ config . parserPreset != null && config . parserPreset . parserOpts != null
67
+ ? config . parserPreset . parserOpts
68
+ : { } ,
69
+ plugins : config . plugins != null ? config . plugins : { } ,
70
+ ignores : config . ignores != null ? config . ignores : [ ] ,
71
+ defaultIgnores :
72
+ config . defaultIgnores != null ? config . defaultIgnores : true ,
73
+ }
74
+ }
75
+
63
76
const showLintResults = async ( [ from , to ] ) => {
64
77
const commits = await getHistoryCommits ( from , to )
65
78
const config = existsSync ( configPath )
66
79
? await load ( { } , { file : configPath } )
67
80
: { }
81
+ const opts = getOptsFromConfig ( config )
68
82
const results = await Promise . all (
69
- commits . map ( commit => lint ( commit , config . rules ) ) ,
83
+ commits . map ( commit => lint ( commit , config . rules , opts ) ) ,
70
84
)
71
85
const formattedResults = format (
72
86
{ results } ,
You can’t perform that action at this time.
0 commit comments