var gulp = require('gulp');
var scssLint = require('gulp-scss-lint');
var jshint = require('gulp-jshint');
+var eslint = require('gulp-eslint');
var PATHS = [
'scss/**/*.scss',
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
+
+gulp.task('lint:eslint', function () {
+ // ESLint ignores files with "node_modules" paths.
+ // So, it's best to have gulp ignore the directory as well.
+ // Also, Be sure to return the stream from the task;
+ // Otherwise, the task may end before the stream has finished.
+ return gulp.src(['js/*.js'])
+ // eslint() attaches the lint output to the "eslint" property
+ // of the file object so it can be used by other modules.
+ .pipe(eslint({
+ useEslintrc: true,
+ configFile: '.eslintrc'
+ }))
+ // eslint.format() outputs the lint results to the console.
+ // Alternatively use eslint.formatEach() (see Docs).
+ .pipe(eslint.format())
+ // To have the process exit with an error code (1) on
+ // lint error, return the stream and pipe to failAfterError last.
+ .pipe(eslint.failAfterError());
+});
"license": "MIT",
"devDependencies": {
"babel-core": "^6.3.26",
+ "babel-eslint": "^4.1.8",
"babel-plugin-transform-es2015-arrow-functions": "^6.3.13",
"babel-plugin-transform-es2015-block-scoped-functions": "^6.3.13",
"babel-plugin-transform-es2015-block-scoping": "^6.4.0",
"gulp-cache-bust": "^1.0.2",
"gulp-concat": "^2.4.3",
"gulp-cssnano": "^2.1.0",
+ "gulp-eslint": "^2.0.0",
"gulp-filter": "^3.0.1",
"gulp-jshint": "^2.0.0",
"gulp-load-plugins": "^1.2.0",