Skip to content

Commit

Permalink
Lint the javascript code with eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj committed Feb 4, 2016
1 parent 95a5ade commit f7d2bdf
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .eslintrc
@@ -0,0 +1,14 @@
{
"extends": "eslint:recommended",
"env": {
"browser": true
},
"plugins": [
"html"
],
"globals": {
"CustomElements": true,
"HTMLImports": true,
"Polymer": true
}
}
7 changes: 7 additions & 0 deletions gulpfile.js
Expand Up @@ -20,6 +20,7 @@ var runseq = require('run-sequence');
var lazypipe = require('lazypipe');
var polyclean = require('polyclean');
var del = require('del');
var eslint = require('gulp-eslint');

var path = require('path');

Expand Down Expand Up @@ -124,3 +125,9 @@ gulp.task('audit', function() {
gulp.task('release', function(cb) {
runseq('default', ['copy-bower-json', 'audit'], cb);
});

gulp.task('eslint', function() {
return gulp.src('src/**/*.html')
.pipe(eslint())
.pipe(eslint.format());
});
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -9,8 +9,10 @@
},
"devDependencies": {
"del": "^1.1.1",
"eslint-plugin-html": "^1.3.0",
"gulp": "^3.8.11",
"gulp-audit": "^1.0.0",
"gulp-eslint": "^1.1.1",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.3",
"gulp-vulcanize": "^6.0.1",
Expand Down

0 comments on commit f7d2bdf

Please sign in to comment.