gulpfile.babel.js
function lintFiles(pattern, strict, configs) {
  const linter = new eslint.CLIEngine(configs);
  const report = linter.executeOnFiles([pattern]);
  const formatter = linter.getFormatter();
  console.log(formatter(report.results));
  if (0 < report.errorCount || (strict && 0 < report.warningCount)) {
    throw new Error('eslint reports some problems.');
  }
}
function lintFiles(pattern, strict, configs) {
  const linter = new eslint.CLIEngine(configs);
  const report = linter.executeOnFiles([pattern]);
  const formatter = linter.getFormatter();
  console.log(formatter(report.results));
  if (0 < report.errorCount || (strict && 0 < report.warningCount)) {
    throw new Error('eslint reports some problems.');
  }
}
function lintFiles ( pattern , strict , configs ) { const linter = new eslint . CLIEngine ( configs ) ; const report = linter . executeOnFiles ( [ pattern ] ) ; const formatter = linter . getFormatter ( ) ; console . log ( formatter ( report . results ) ) ; if ( 0 < report . errorCount || ( strict && 0 < report . warningCount ) ) { throw new Error ( 'eslint reports some problems.' ) ; } }
Lint the specified files using eslint.
Lint the specified files using eslint .