var gulp = require('gulp');
var scssLint = require('gulp-scss-lint');
-var jshint = require('gulp-jshint');
var eslint = require('gulp-eslint');
var PATHS = [
.pipe(scssLint());
});
-gulp.task('lint:javascript', function() {
- jshint.lookup = false;
-
- return gulp.src('js/*.js')
- .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.
+gulp.task('lint:javascript', function () {
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());
});
"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",
"gulp-mocha": "^2.2.0",
"gulp-newer": "^1.1.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.1.0",
"inquirer": "^0.11.2",
- "jshint": "^2.9.1",
"mocha": "^2.3.3",
"motion-ui": "^1.1.0",
"octophant": "^1.0.0",