/
mocha.js
40 lines (39 loc) · 1.15 KB
/
mocha.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
'use strict';
module.exports = {
env: {
mocha: true,
},
overrides: [
{
files: ['test/**'],
rules: {
'no-invalid-this': 'off',
},
},
],
plugins: ['mocha'],
rules: {
'mocha/handle-done-callback': 'error',
'mocha/max-top-level-suites': ['error', { limit: 1 }],
'mocha/no-exclusive-tests': 'warn',
'mocha/no-exports': 'error',
'mocha/no-global-tests': 'error',
'mocha/no-hooks': 'off',
'mocha/no-hooks-for-single-case': 'off',
'mocha/no-identical-title': 'error',
'mocha/no-mocha-arrows': 'error',
'mocha/no-nested-tests': 'error',
'mocha/no-pending-tests': 'warn',
'mocha/no-return-and-callback': 'off', // mocha has this built-in
'mocha/no-return-from-async': 'error',
'mocha/no-setup-in-describe': 'off', // too many false positives
'mocha/no-sibling-hooks': 'error',
'mocha/no-skipped-tests': 'warn',
'mocha/no-synchronous-tests': 'off',
'mocha/no-top-level-hooks': 'error',
'mocha/prefer-arrow-callback': 'off',
'mocha/valid-suite-description': 'off',
'mocha/valid-test-description': 'off',
'mocha/no-async-describe': 'error',
},
};