-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
59 lines (57 loc) · 1.33 KB
/
.eslintrc.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
59
const globals = require('globals')
module.exports = {
extends: 'standard',
plugins: ['jest', , 'node'],
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true
},
rules: {
'space-before-function-paren': [
2,
{
anonymous: 'never',
named: 'never',
asyncArrow: 'always'
}
]
},
overrides: [
{
files: ['test/*', 'test/**/*', '*.test.js'],
rules: {
'node/no-unpublished-require': 'off',
'node/no-missing-require': [
'error',
{
allowModules: ['worker_threads']
}
]
},
globals: globals.jest
},
{
files: ['*.test.js'],
extends: ['plugin:jest/recommended', 'plugin:jest/style'],
rules: {
'jest/valid-expect-in-promise': 'off',
'jest/prefer-hooks-on-top': 'error',
'jest/no-duplicate-hooks': 'error',
'jest/consistent-test-it': ['error', { fn: 'it' }],
'jest/prefer-called-with': 'error',
'jest/no-truthy-falsy': 'error',
'jest/lowercase-name': 'error',
'jest/prefer-spy-on': 'error',
'jest/expect-expect': 'off',
'jest/valid-title': 'error',
'jest/prefer-todo': 'error',
'global-require': 'off'
},
globals: globals.jest
}
]
}