diff --git a/.eslintrc b/.eslintrc index 82c291e8ce..585f456870 100644 --- a/.eslintrc +++ b/.eslintrc @@ -81,9 +81,6 @@ "block-spacing": [2, "always"], "key-spacing": [2, {"beforeColon": false, "afterColon": true}], "max-nested-callbacks": [2, 3], - "mocha/no-exclusive-tests": 2, - "mocha/no-global-tests": 2, - "mocha/handle-done-callback": 2, "new-cap": 2, "new-parens": 2, "newline-after-var": 2, @@ -119,11 +116,5 @@ ecmaFeatures : { modules: true }, - "extends": "eslint:recommended", - "globals": { - "expect": true - }, - "plugins": [ - "mocha" - ] + "extends": "eslint:recommended" } diff --git a/tasks/gulp-eslint.js b/tasks/gulp-eslint.js index f67e0a47c1..446d9d8324 100644 --- a/tasks/gulp-eslint.js +++ b/tasks/gulp-eslint.js @@ -46,7 +46,18 @@ gulp.task('lint:tests', () => { '!./test/server_side/**/*', '!./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.failAfterError()); });