@@ -19,30 +19,33 @@ import requireTopLevelDescribe from './rules/require-top-level-describe';
19
19
import validExpect from './rules/valid-expect' ;
20
20
import preferWebFirstAssertions from './rules/prefer-web-first-assertions' ;
21
21
22
+ const recommended = {
23
+ plugins : [ 'playwright' ] ,
24
+ env : {
25
+ 'shared-node-browser' : true ,
26
+ } ,
27
+ rules : {
28
+ 'no-empty-pattern' : 'off' ,
29
+ 'playwright/missing-playwright-await' : 'error' ,
30
+ 'playwright/no-page-pause' : 'warn' ,
31
+ 'playwright/no-element-handle' : 'warn' ,
32
+ 'playwright/no-eval' : 'warn' ,
33
+ 'playwright/no-focused-test' : 'error' ,
34
+ 'playwright/no-skipped-test' : 'warn' ,
35
+ 'playwright/no-wait-for-timeout' : 'warn' ,
36
+ 'playwright/no-force-option' : 'warn' ,
37
+ 'playwright/max-nested-describe' : 'warn' ,
38
+ 'playwright/no-conditional-in-test' : 'warn' ,
39
+ 'playwright/no-useless-not' : 'warn' ,
40
+ 'playwright/prefer-web-first-assertions' : 'error' ,
41
+ 'playwright/valid-expect' : 'error' ,
42
+ } ,
43
+ } ;
44
+
22
45
export = {
23
46
configs : {
24
- 'playwright-test' : {
25
- plugins : [ 'playwright' ] ,
26
- env : {
27
- 'shared-node-browser' : true ,
28
- } ,
29
- rules : {
30
- 'no-empty-pattern' : 'off' ,
31
- 'playwright/missing-playwright-await' : 'error' ,
32
- 'playwright/no-page-pause' : 'warn' ,
33
- 'playwright/no-element-handle' : 'warn' ,
34
- 'playwright/no-eval' : 'warn' ,
35
- 'playwright/no-focused-test' : 'error' ,
36
- 'playwright/no-skipped-test' : 'warn' ,
37
- 'playwright/no-wait-for-timeout' : 'warn' ,
38
- 'playwright/no-force-option' : 'warn' ,
39
- 'playwright/max-nested-describe' : 'warn' ,
40
- 'playwright/no-conditional-in-test' : 'warn' ,
41
- 'playwright/no-useless-not' : 'warn' ,
42
- 'playwright/prefer-web-first-assertions' : 'error' ,
43
- 'playwright/valid-expect' : 'error' ,
44
- } ,
45
- } ,
47
+ recommended,
48
+ 'playwright-test' : recommended ,
46
49
'jest-playwright' : {
47
50
plugins : [ 'jest' , 'playwright' ] ,
48
51
env : {
0 commit comments