-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
61 lines (56 loc) · 1.47 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
59
60
61
module.exports = {
extends: ['plugin:jest-formatting/strict'],
plugins: ['jest', 'jest-formatting'],
overrides: [
{
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
env: {
'jest/globals': true,
},
},
// Don't expect expects in cypress
{
files: ['cypress/**/*.{ts,tsx}'],
rules: {
'jest/expect-expect': 0,
},
},
],
rules: {
//
// Recommended
//
'jest/expect-expect': 'error',
'jest/no-disabled-tests': 'error',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/no-jasmine-globals': 'error',
'jest/no-mocks-import': 0,
'jest/no-done-callback': 0,
'jest/no-test-prefixes': 'error',
'jest/valid-describe-callback': 'error',
'jest/valid-expect-in-promise': 'error',
'jest/valid-expect': 'error',
//
// Optional
//
'jest/consistent-test-it': 'error',
'jest/prefer-lowercase-title': 0,
'jest/no-hooks': 0,
'jest/no-large-snapshots': 'error',
'jest/no-test-return-statement': 'error',
'jest/no-truthy-falsy': 0,
'jest/prefer-called-with': 1,
'jest/prefer-expect-assertions': 0,
'jest/prefer-inline-snapshots': 0,
'jest/prefer-spy-on': 0,
'jest/prefer-strict-equal': 'error',
'jest/prefer-todo': 'error',
//
// Style
//
'jest/no-alias-methods': 'error',
'jest/prefer-to-contain': 'error',
'jest/prefer-to-have-length': 'error',
},
}