async.waterfall([ // execute the CLI engine function (next) { next(null, (new ESLintCLIEngine()).executeOnFiles(LINT_SOURCE_DIRS)); }, // output results function (report, next) { var errorReport = ESLintCLIEngine.getErrorResults(report.results); // log the result to CLI console.log(ESLintCLIEngine.getFormatter()(report.results)); // log the success of the parser if it has no errors (errorReport && !errorReport.length) && console.log(chalk.green('eslint ok!')); // ensure that the exit code is non zero in case there was an error next(Number(errorReport && errorReport.length) || 0); } ], exit);
const errorResults = LinterEngine.getErrorResults(lintResult.results);
var errorReport = ESLintCLIEngine.getErrorResults(report.results);