File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 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) {
6060 } )
6161}
6262
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+
6376const showLintResults = async ( [ from , to ] ) => {
6477 const commits = await getHistoryCommits ( from , to )
6578 const config = existsSync ( configPath )
6679 ? await load ( { } , { file : configPath } )
6780 : { }
81+ const opts = getOptsFromConfig ( config )
6882 const results = await Promise . all (
69- commits . map ( commit => lint ( commit , config . rules ) ) ,
83+ commits . map ( commit => lint ( commit , config . rules , opts ) ) ,
7084 )
7185 const formattedResults = format (
7286 { results } ,
You can’t perform that action at this time.
0 commit comments