Skip to content

Commit

Permalink
Use ESLint for Polymer
Browse files Browse the repository at this point in the history
Modified version of #2600

- Ignores experimental and demo folders
- A few style tweaks
- Rename gulp task to `gulp lint`, and cause it to emit non-zero status
  for travis testing

Thanks to @fredj for the base PR
  • Loading branch information
dfreedm committed Feb 5, 2016
1 parent d6e7033 commit f3c4bb1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/*
bower_components/*
test/*
src/**/demo/*
src/**/experimental/*
4 changes: 4 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"extends": "eslint:recommended",
"rules": {
"no-cond-assign": [2, "except-parens"],
"no-console": 0
},
"env": {
"browser": true
},
Expand Down
5 changes: 3 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ gulp.task('release', function(cb) {
runseq('default', ['copy-bower-json', 'audit'], cb);
});

gulp.task('eslint', function() {
gulp.task('lint', function() {
return gulp.src('src/**/*.html')
.pipe(eslint())
.pipe(eslint.format());
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

0 comments on commit f3c4bb1

Please sign in to comment.