Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
try {
output = run( engine, codepath );
} catch ( err ) {
if ( err.messageTemplate === 'no-config-found' ) {
// Try with default configuration.
const engine = new CLIEngine( { ...options, configFile: `${ standardPath }/index.js` } );
console.log( 'Running eslint with default config on path', codepath );
output = run( engine, codepath );
} else {
console.log( err );
throw err;
}
}
// Reset path loader.
moduleAlias.reset();
Module._findPath = origFindPath;
resolve( formatOutput( output, codepath ) );
} );
};