|
| 1 | +import configs from './configs'; |
1 | 2 | import rules from './rules'; |
2 | 3 |
|
3 | | -const domRules = { |
4 | | - 'testing-library/await-async-query': 'error', |
5 | | - 'testing-library/await-async-utils': 'error', |
6 | | - 'testing-library/no-await-sync-query': 'error', |
7 | | - 'testing-library/no-promise-in-fire-event': 'error', |
8 | | - 'testing-library/no-wait-for-empty-callback': 'error', |
9 | | - 'testing-library/prefer-find-by': 'error', |
10 | | - 'testing-library/prefer-screen-queries': 'error', |
11 | | -}; |
12 | | - |
13 | | -const angularRules = { |
14 | | - ...domRules, |
15 | | - 'testing-library/no-container': 'error', |
16 | | - 'testing-library/no-debug': 'error', |
17 | | - 'testing-library/no-dom-import': ['error', 'angular'], |
18 | | - 'testing-library/no-node-access': 'error', |
19 | | - 'testing-library/render-result-naming-convention': 'error', |
20 | | -}; |
21 | | - |
22 | | -const reactRules = { |
23 | | - ...domRules, |
24 | | - 'testing-library/no-container': 'error', |
25 | | - 'testing-library/no-debug': 'error', |
26 | | - 'testing-library/no-dom-import': ['error', 'react'], |
27 | | - 'testing-library/no-node-access': 'error', |
28 | | - 'testing-library/render-result-naming-convention': 'error', |
29 | | -}; |
30 | | - |
31 | | -const vueRules = { |
32 | | - ...domRules, |
33 | | - 'testing-library/await-fire-event': 'error', |
34 | | - 'testing-library/no-container': 'error', |
35 | | - 'testing-library/no-debug': 'error', |
36 | | - 'testing-library/no-dom-import': ['error', 'vue'], |
37 | | - 'testing-library/no-node-access': 'error', |
38 | | - 'testing-library/render-result-naming-convention': 'error', |
39 | | -}; |
40 | | - |
41 | 4 | export = { |
| 5 | + configs, |
42 | 6 | rules, |
43 | | - configs: { |
44 | | - dom: { |
45 | | - plugins: ['testing-library'], |
46 | | - rules: domRules, |
47 | | - }, |
48 | | - angular: { |
49 | | - plugins: ['testing-library'], |
50 | | - rules: angularRules, |
51 | | - }, |
52 | | - react: { |
53 | | - plugins: ['testing-library'], |
54 | | - rules: reactRules, |
55 | | - }, |
56 | | - vue: { |
57 | | - plugins: ['testing-library'], |
58 | | - rules: vueRules, |
59 | | - }, |
60 | | - }, |
61 | 7 | }; |
0 commit comments