forked from lo1tuma/eslint-plugin-mocha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
58 lines (57 loc) · 2.91 KB
/
index.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
'use strict';
module.exports = {
rules: {
'handle-done-callback': require('./lib/rules/handle-done-callback'),
'max-top-level-suites': require('./lib/rules/max-top-level-suites'),
'no-async-describe': require('./lib/rules/no-async-describe'),
'no-exclusive-tests': require('./lib/rules/no-exclusive-tests'),
'no-exports': require('./lib/rules/no-exports'),
'no-global-tests': require('./lib/rules/no-global-tests'),
'no-hooks': require('./lib/rules/no-hooks'),
'no-hooks-for-single-case': require('./lib/rules/no-hooks-for-single-case'),
'no-identical-title': require('./lib/rules/no-identical-title'),
'no-mocha-arrows': require('./lib/rules/no-mocha-arrows'),
'no-nested-tests': require('./lib/rules/no-nested-tests'),
'no-pending-tests': require('./lib/rules/no-pending-tests'),
'no-return-and-callback': require('./lib/rules/no-return-and-callback'),
'no-return-from-async': require('./lib/rules/no-return-from-async'),
'no-setup-in-describe': require('./lib/rules/no-setup-in-describe'),
'no-sibling-hooks': require('./lib/rules/no-sibling-hooks'),
'no-skipped-tests': require('./lib/rules/no-skipped-tests'),
'no-synchronous-tests': require('./lib/rules/no-synchronous-tests'),
'no-top-level-hooks': require('./lib/rules/no-top-level-hooks'),
'prefer-arrow-callback': require('./lib/rules/prefer-arrow-callback'),
'valid-suite-description': require('./lib/rules/valid-suite-description'),
'valid-test-description': require('./lib/rules/valid-test-description')
},
configs: {
recommended: {
env: { mocha: true },
plugins: [ 'mocha' ],
rules: {
'mocha/handle-done-callback': 'error',
'mocha/max-top-level-suites': [ 'error', { limit: 1 } ],
'mocha/no-async-describe': 'error',
'mocha/no-exclusive-tests': 'warn',
'mocha/no-exports': 'error',
'mocha/no-global-tests': 'error',
'mocha/no-hooks': 'off',
'mocha/no-hooks-for-single-case': 'warn',
'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': 'error',
'mocha/no-return-from-async': 'off',
'mocha/no-setup-in-describe': 'error',
'mocha/no-sibling-hooks': 'error',
'mocha/no-skipped-tests': 'warn',
'mocha/no-synchronous-tests': 'off',
'mocha/no-top-level-hooks': 'warn',
'mocha/prefer-arrow-callback': 'off',
'mocha/valid-suite-description': 'off',
'mocha/valid-test-description': 'off'
}
}
}
};