File tree Expand file tree Collapse file tree
eslint-config-airbnb-base Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,11 +51,16 @@ if (CLIEngine) {
5151 const path = require ( 'path' ) ;
5252 const { execSync } = require ( 'child_process' ) ;
5353
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- } ) ) ) ;
54+ try {
55+ // NOTE: ESLint adds runtime statistics to the output (so it's no longer JSON) if TIMING is set
56+ module . exports = JSON . parse ( String ( execSync ( path . join ( __dirname , 'whitespace-async.js' ) , {
57+ env : {
58+ ...process . env ,
59+ TIMING : undefined ,
60+ }
61+ } ) ) ) ;
62+ } catch ( error ) {
63+ console . error ( 'Error loading whitespace config:' , error . message ) ;
64+ process . exit ( 1 ) ;
65+ }
6166}
Original file line number Diff line number Diff line change @@ -51,11 +51,16 @@ if (CLIEngine) {
5151 const path = require ( 'path' ) ;
5252 const { execSync } = require ( 'child_process' ) ;
5353
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- } ) ) ) ;
54+ try {
55+ // NOTE: ESLint adds runtime statistics to the output (so it's no longer JSON) if TIMING is set
56+ module . exports = JSON . parse ( String ( execSync ( path . join ( __dirname , 'whitespace-async.js' ) , {
57+ env : {
58+ ...process . env ,
59+ TIMING : undefined ,
60+ }
61+ } ) ) ) ;
62+ } catch ( error ) {
63+ console . error ( 'Error loading whitespace config:' , error . message ) ;
64+ process . exit ( 1 ) ;
65+ }
6166}
You can’t perform that action at this time.
0 commit comments