mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
Use ESLint for Polymer
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
This commit is contained in:
parent
d6e7033ac0
commit
f3c4bb1cd6
5
.eslintignore
Normal file
5
.eslintignore
Normal file
@ -0,0 +1,5 @@
|
||||
node_modules/*
|
||||
bower_components/*
|
||||
test/*
|
||||
src/**/demo/*
|
||||
src/**/experimental/*
|
@ -1,5 +1,9 @@
|
||||
{
|
||||
"extends": "eslint:recommended",
|
||||
"rules": {
|
||||
"no-cond-assign": [2, "except-parens"],
|
||||
"no-console": 0
|
||||
},
|
||||
"env": {
|
||||
"browser": true
|
||||
},
|
||||
|
@ -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());
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user