mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
Move test specific eslint rules to eslint task
This commit is contained in:
11
.eslintrc
11
.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"
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user