How to use the eslint/lib/cli.execute function in eslint

To help you get started, we’ve selected a few eslint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github radiant-player / radiant-player-electron / gulpfile.babel.js View on Github external
gulp.task('test:eslint', () => {
  const code = eslint.execute('--ignore-path .gitignore .');

  if (code) {
    throw new gutil.PluginError('test:eslint', new Error('ESLint error'));
  }
});
github alexfedoseev / generator-flux-on-rails / app / templates / app / gulpfile.babel.js View on Github external
gulp.task('lint', done => {

  eslint.execute('--ext .js,.jsx .');
  done();

});
github twilio / twilio-video.js / gulpfile.js View on Github external
.pipe(then(function(files) {
        if (files.length) {
          var paths = getPaths(files);
          var code = eslint.execute(paths.join(' '));
          if (code) {
            reject(new util.PluginError('lint', new Error('ESLint error')));
            return;
          }
        }
        resolve(files);
      }));
  });
github twilio / twilio-common.js / gulpfile.js View on Github external
.pipe(then(function(files) {
      if (files.length) {
        var paths = getPaths(files);
        var code = eslint.execute(paths.join(' '));
        if (code) {
          done(new util.PluginError('lint', new Error('ESLint error')));
          return;
        }
      }
      done(null, files.length);
    }));
}
github shakacode / react-webpack-rails-tutorial / client / gulpfile.js View on Github external
gulp.task('lint', function gulpLint(done) {
  eslint.execute('--ext .js,.jsx .');
  return done();
});
github twilio / ortc-adapter / gulpfile.js View on Github external
.pipe(then(function(files) {
      if (files.length) {
        var paths = getPaths(files);
        var code = eslint.execute(paths.join(' '));
        if (code) {
          done(new util.PluginError('lint', new Error('ESLint error')));
          return;
        }
      }
      done(null, files.length);
    }));
}