Skip to content
Open
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
2 changes: 2 additions & 0 deletions .vscode/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GitShift personal account configuration
github-accounts.json
5 changes: 4 additions & 1 deletion packages/eslint-config-airbnb-base/whitespace-async.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,7 @@ async function onlyErrorOnRules(rulesToError, config) {
return errorsOnly;
}

onlyErrorOnRules(whitespaceRules, baseConfig).then((config) => console.log(JSON.stringify(config)));
onlyErrorOnRules(whitespaceRules, baseConfig).then((config) => console.log(JSON.stringify(config))).catch((error) => {
console.error(error);
process.exit(1);
});
19 changes: 12 additions & 7 deletions packages/eslint-config-airbnb-base/whitespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,16 @@ if (CLIEngine) {
const path = require('path');
const { execSync } = require('child_process');

// 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,
}
})));
try {
// 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,
}
})));
} catch (error) {
console.error('Error loading whitespace config:', error.message);
process.exit(1);
}
}
5 changes: 4 additions & 1 deletion packages/eslint-config-airbnb/whitespace-async.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,7 @@ async function onlyErrorOnRules(rulesToError, config) {
return errorsOnly;
}

onlyErrorOnRules(whitespaceRules, baseConfig).then((config) => console.log(JSON.stringify(config)));
onlyErrorOnRules(whitespaceRules, baseConfig).then((config) => console.log(JSON.stringify(config))).catch((error) => {
console.error(error);
process.exit(1);
});
19 changes: 12 additions & 7 deletions packages/eslint-config-airbnb/whitespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,16 @@ if (CLIEngine) {
const path = require('path');
const { execSync } = require('child_process');

// 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,
}
})));
try {
// 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,
}
})));
} catch (error) {
console.error('Error loading whitespace config:', error.message);
process.exit(1);
}
}
Loading