1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | 'use strict';
|
9 |
|
10 |
|
11 | require('@rushstack/eslint-patch/modern-module-resolution');
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | module.exports = {
|
18 | plugins: ['jest', 'testing-library'],
|
19 | overrides: [
|
20 | {
|
21 | files: ['**/__tests__/**/*', '**/*.{spec,test}.*'],
|
22 | env: {
|
23 | 'jest/globals': true,
|
24 | },
|
25 |
|
26 | rules: {
|
27 |
|
28 | 'jest/no-conditional-expect': 'error',
|
29 | 'jest/no-identical-title': 'error',
|
30 | 'jest/no-interpolation-in-snapshots': 'error',
|
31 | 'jest/no-jasmine-globals': 'error',
|
32 | 'jest/no-jest-import': 'error',
|
33 | 'jest/no-mocks-import': 'error',
|
34 | 'jest/valid-describe-callback': 'error',
|
35 | 'jest/valid-expect': 'error',
|
36 | 'jest/valid-expect-in-promise': 'error',
|
37 | 'jest/valid-title': 'warn',
|
38 |
|
39 |
|
40 | 'testing-library/await-async-query': 'error',
|
41 | 'testing-library/await-async-utils': 'error',
|
42 | 'testing-library/no-await-sync-query': 'error',
|
43 | 'testing-library/no-container': 'error',
|
44 | 'testing-library/no-debugging-utils': 'error',
|
45 | 'testing-library/no-dom-import': ['error', 'react'],
|
46 | 'testing-library/no-node-access': 'error',
|
47 | 'testing-library/no-promise-in-fire-event': 'error',
|
48 | 'testing-library/no-render-in-setup': 'error',
|
49 | 'testing-library/no-unnecessary-act': 'error',
|
50 | 'testing-library/no-wait-for-empty-callback': 'error',
|
51 | 'testing-library/no-wait-for-multiple-assertions': 'error',
|
52 | 'testing-library/no-wait-for-side-effects': 'error',
|
53 | 'testing-library/no-wait-for-snapshot': 'error',
|
54 | 'testing-library/prefer-find-by': 'error',
|
55 | 'testing-library/prefer-presence-queries': 'error',
|
56 | 'testing-library/prefer-query-by-disappearance': 'error',
|
57 | 'testing-library/prefer-screen-queries': 'error',
|
58 | 'testing-library/render-result-naming-convention': 'error',
|
59 | },
|
60 | },
|
61 | ],
|
62 | };
|