@@ -56,7 +56,7 @@ async function run(console, runOptions) {
5656 return content + "Source: http://eslint.org/docs/rules/\n"
5757 }
5858
59- function buildIssueJson ( message , path ) {
59+ async function buildIssueJson ( message , path ) {
6060 // ESLint doesn't emit a ruleId in the
6161 // case of a fatal error (such as an invalid
6262 // token)
@@ -88,7 +88,7 @@ async function run(console, runOptions) {
8888 } ,
8989 } ,
9090 } ,
91- remediation_points : checks . remediationPoints ( checkName , message , cli . calculateConfigForFile ( path ) ) ,
91+ remediation_points : checks . remediationPoints ( checkName , message , await cli . calculateConfigForFile ( path ) ) ,
9292 }
9393
9494 var fingerprint = computeFingerprint ( path , checkName , message . message )
@@ -201,16 +201,16 @@ async function run(console, runOptions) {
201201 batchReport = await cli . lintFiles ( batchFiles )
202202 } )
203203
204- runWithTiming ( "report-batch" + batchNum , function ( ) {
204+ await runWithTimingAsync ( "report-batch" + batchNum , async function ( ) {
205205 batchReport . forEach ( function ( result ) {
206206 var path = result . filePath . replace ( / ^ \/ c o d e \/ / , "" )
207207
208- result . messages . forEach ( function ( message ) {
208+ result . messages . forEach ( async function ( message ) {
209209 if ( ignoreWarnings && message . severity === ESLINT_WARNING_SEVERITY ) {
210210 return
211211 }
212212
213- var readableJsonStream = buildIssueJson ( message , path )
213+ var readableJsonStream = await buildIssueJson ( message , path )
214214 var output = ""
215215 readableJsonStream . on ( 'data' , ( chunk ) => {
216216 output = output + `${ JSON . stringify ( chunk ) } `
0 commit comments