-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.js
28 lines (27 loc) · 1.07 KB
/
jest.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
module.exports = {
'extends': ['plugin:jest/recommended'],
plugins: ['jest'],
rules: {
// The rules below are listed in the order they appear on the eslint-plugin-jest rules page.
// Jest
// https://github.com/jest-community/eslint-plugin-jest#rules
'jest/consistent-test-it': ['error', { fn: 'test' }], // eslint-disable-line id-length
'jest/no-duplicate-hooks': 'error',
'jest/no-restricted-matchers': [
'error', {
resolves: 'Use `expect(await promise)` instead.',
toBeTruthy: 'Avoid `toBeTruthy`',
toBeFalsy: 'Avoid `toBeFalsy`'
}
],
'jest/no-test-return-statement': 'error',
'jest/prefer-expect-resolves': 'error',
'jest/prefer-hooks-on-top': 'error',
'jest/prefer-to-be': 'error',
'jest/prefer-to-contain': 'error',
'jest/prefer-to-have-length': 'error',
'jest/require-to-throw-message': 'error',
'jest/require-top-level-describe': 'error',
'jest/prefer-todo': 'error'
}
};