-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmocha.js
44 lines (40 loc) · 1.04 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
41
42
43
44
// Todo: Might move these very basic configs (Mocha, and add one for Node
// globals, etc.) to own repo
import {languageOptions} from './detectEnv.js';
/** @type {import('eslint').Linter.Config[]} */
export default [{
name: 'ash-nazg/mocha',
files: ['**/test/**', '**/tests/**', 'cypress/e2e/**'],
languageOptions: {
...(languageOptions.ecmaVersion
? {
ecmaVersion: languageOptions.ecmaVersion
}
: {}
),
globals: {
// Imported nowadays
// chai: 'readonly',
// expect: 'readonly',
// assert: 'readonly',
// should: 'readonly',
// Could use globals.mocha for the following, but that
// includes even more
after: 'readonly',
afterEach: 'readonly',
before: 'readonly',
beforeEach: 'readonly',
describe: 'readonly',
it: 'readonly',
mocha: 'readonly',
xdescribe: 'readonly',
xit: 'readonly'
}
}
// Could disable arrow functions, named functions
/*
rules: {
'max-nested-callbacks': 'off',
},
*/
}];