Skip to content

Commit

Permalink
Styelint, Eslint: use ignore files instead of gulp tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
arturkot committed May 11, 2017
1 parent 85087e6 commit 2df3590
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions generators/app/templates/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
vendor
1 change: 1 addition & 0 deletions generators/app/templates/.stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
4 changes: 2 additions & 2 deletions generators/app/templates/gulp/tasks/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ var path = require('path');

var lintTask = function (gulp, plugins, config) {
gulp.task('lint-js', function() {
return gulp.src([path.join(config.src.base, config.src.scripts), '!node_modules/**', '!src/scripts/vendor/**'])
return gulp.src(path.join(config.src.base, config.src.scripts))
.pipe(plugins.eslint())
.pipe(plugins.eslint.format())
.pipe(plugins.eslint.failAfterError());
});

gulp.task('lint-css', function() {
return gulp.src([path.join(config.src.base, config.src.styles), '!src/styles/vendor/**'])
return gulp.src(path.join(config.src.base, config.src.styles))
.pipe(plugins.stylelint({
reporters: [
{formatter: 'string', console: true}
Expand Down

0 comments on commit 2df3590

Please sign in to comment.