mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +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"],
|
"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"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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());
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user