mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-10 18:58:03 -05:00
[eslint config] [*] [fix] fix crash in eslint invocation with TIMING env set
This commit is contained in:
committed by
Jordan Harband
parent
e6080c7bee
commit
f45bd1ebc0
@@ -51,5 +51,11 @@ if (CLIEngine) {
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
module.exports = JSON.parse(String(execSync(path.join(__dirname, 'whitespace-async.js'))));
|
||||
// NOTE: ESLint adds runtime statistics to the output (so it's no longer JSON) if TIMING is set
|
||||
module.exports = JSON.parse(String(execSync(path.join(__dirname, 'whitespace-async.js'), {
|
||||
env: {
|
||||
...process.env,
|
||||
TIMING: undefined,
|
||||
}
|
||||
})));
|
||||
}
|
||||
|
||||
@@ -51,5 +51,11 @@ if (CLIEngine) {
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
module.exports = JSON.parse(String(execSync(path.join(__dirname, 'whitespace-async.js'))));
|
||||
// NOTE: ESLint adds runtime statistics to the output (so it's no longer JSON) if TIMING is set
|
||||
module.exports = JSON.parse(String(execSync(path.join(__dirname, 'whitespace-async.js'), {
|
||||
env: {
|
||||
...process.env,
|
||||
TIMING: undefined,
|
||||
}
|
||||
})));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user