Move test specific eslint rules to eslint task

This commit is contained in:
Blade Barringer
2015-11-18 08:50:03 -06:00
parent f94394127a
commit 22c8a24d15
2 changed files with 13 additions and 11 deletions

View File

@@ -81,9 +81,6 @@
"block-spacing": [2, "always"], "block-spacing": [2, "always"],
"key-spacing": [2, {"beforeColon": false, "afterColon": true}], "key-spacing": [2, {"beforeColon": false, "afterColon": true}],
"max-nested-callbacks": [2, 3], "max-nested-callbacks": [2, 3],
"mocha/no-exclusive-tests": 2,
"mocha/no-global-tests": 2,
"mocha/handle-done-callback": 2,
"new-cap": 2, "new-cap": 2,
"new-parens": 2, "new-parens": 2,
"newline-after-var": 2, "newline-after-var": 2,
@@ -119,11 +116,5 @@
ecmaFeatures : { ecmaFeatures : {
modules: true modules: true
}, },
"extends": "eslint:recommended", "extends": "eslint:recommended"
"globals": {
"expect": true
},
"plugins": [
"mocha"
]
} }

View File

@@ -46,7 +46,18 @@ gulp.task('lint:tests', () => {
'!./test/server_side/**/*', '!./test/server_side/**/*',
'!./test/spec/**/*', '!./test/spec/**/*',
]) ])
.pipe(eslint()) .pipe(eslint({
rules: {
'no-unused-expressions': 0,
'mocha/no-exclusive-tests': 2,
'mocha/no-global-tests': 2,
'mocha/handle-done-callback': 2,
},
globals: {
'expect': true,
},
plugins: [ 'mocha' ],
}))
.pipe(eslint.format()) .pipe(eslint.format())
.pipe(eslint.failAfterError()); .pipe(eslint.failAfterError());
}); });