2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -51,5 +51,11 @@ if (CLIEngine) {
51
51
const path = require ( 'path' ) ;
52
52
const { execSync } = require ( 'child_process' ) ;
53
53
54
- module . exports = JSON . parse ( String ( execSync ( path . join ( __dirname , 'whitespace-async.js' ) ) ) ) ;
54
+ // NOTE: ESLint adds runtime statistics to the output (so it's no longer JSON) if TIMING is set
55
+ module . exports = JSON . parse ( String ( execSync ( path . join ( __dirname , 'whitespace-async.js' ) , {
56
+ env : {
57
+ ...process . env ,
58
+ TIMING : undefined ,
59
+ }
60
+ } ) ) ) ;
55
61
}
Original file line number Diff line number Diff line change @@ -51,5 +51,11 @@ if (CLIEngine) {
51
51
const path = require ( 'path' ) ;
52
52
const { execSync } = require ( 'child_process' ) ;
53
53
54
- module . exports = JSON . parse ( String ( execSync ( path . join ( __dirname , 'whitespace-async.js' ) ) ) ) ;
54
+ // NOTE: ESLint adds runtime statistics to the output (so it's no longer JSON) if TIMING is set
55
+ module . exports = JSON . parse ( String ( execSync ( path . join ( __dirname , 'whitespace-async.js' ) , {
56
+ env : {
57
+ ...process . env ,
58
+ TIMING : undefined ,
59
+ }
60
+ } ) ) ) ;
55
61
}
0 commit comments