update eslint
This commit is contained in:
parent
088fd42e78
commit
9f31ad65c6
|
@ -23,8 +23,3 @@ trim_trailing_whitespace = false
|
|||
[{package,bower}.json]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[gulpfile.js]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
|
|
31
.eslintrc.json
Normal file
31
.eslintrc.json
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"angular",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"indent": [
|
||||
"error",
|
||||
4
|
||||
],
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix"
|
||||
],
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"always"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -34,7 +34,6 @@ gulp.task('lint', function () {
|
|||
return gulp.src([
|
||||
'src/scripts/**/*.js'
|
||||
]).pipe(reload({stream: true, once: true}))
|
||||
.pipe($.eslint({fix: true}))
|
||||
.pipe($.eslint.format())
|
||||
.pipe($.if(!browserSync.active, $.eslint.failAfterError()))
|
||||
.pipe(gulp.dest('src/scripts'));
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
"devDependencies": {
|
||||
"browser-sync": "^2.18.2",
|
||||
"del": "^2.2.2",
|
||||
"eslint-config-angular": "^0.5.0",
|
||||
"eslint-plugin-angular": "^1.4.1",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-angular-templatecache": "^2.0.0",
|
||||
"gulp-autoprefixer": "^3.1.1",
|
||||
|
|
Reference in a new issue