Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/eslint-config-airbnb-base/whitespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ if (CLIEngine) {
} else {
const path = require('path');
const { execSync } = require('child_process');
const isWindows = process.platform === 'win32';
const whitespaceAsyncPath = path.join(__dirname, 'whitespace-async.js');
const execSyncCommand = isWindows ? `node ${whitespaceAsyncPath}` : whitespaceAsyncPath;

// 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'), {
module.exports = JSON.parse(String(execSync(execSyncCommand, {
windowsHide: true,
env: {
...process.env,
TIMING: undefined,
Expand Down
6 changes: 5 additions & 1 deletion packages/eslint-config-airbnb/whitespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ if (CLIEngine) {
} else {
const path = require('path');
const { execSync } = require('child_process');
const isWindows = process.platform === 'win32';
const whitespaceAsyncPath = path.join(__dirname, 'whitespace-async.js');
const execSyncCommand = isWindows ? `node ${whitespaceAsyncPath}` : whitespaceAsyncPath;

// 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'), {
module.exports = JSON.parse(String(execSync(execSyncCommand, {
windowsHide: true,
env: {
...process.env,
TIMING: undefined,
Expand Down