@dvukovic/style-guide 0.3.52 → 0.3.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -73,6 +73,14 @@ module.exports = {
73
73
  ),
74
74
  ],
75
75
  },
76
+ {
77
+ files: ["*.ui.test.ts"],
78
+ extends: [
79
+ require.resolve(
80
+ "@dvukovic/style-guide/src/eslint/configs/playwright",
81
+ ),
82
+ ],
83
+ },
76
84
  ],
77
85
  }
78
86
  ```
@@ -124,6 +132,14 @@ module.exports = {
124
132
  ],
125
133
  files: ["*.test.ts", "*.test.js"],
126
134
  },
135
+ {
136
+ files: ["*.ui.test.ts"],
137
+ extends: [
138
+ require.resolve(
139
+ "@dvukovic/style-guide/src/eslint/configs/playwright",
140
+ ),
141
+ ],
142
+ },
127
143
  {
128
144
  extends: [
129
145
  require.resolve(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvukovic/style-guide",
3
- "version": "0.3.52",
3
+ "version": "0.3.53",
4
4
  "description": "My own style guide",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,6 +43,7 @@
43
43
  "eslint-plugin-jest": "28.9.0",
44
44
  "eslint-plugin-mobx": "0.0.13",
45
45
  "eslint-plugin-n": "17.13.1",
46
+ "eslint-plugin-playwright": "2.1.0",
46
47
  "eslint-plugin-promise": "7.1.0",
47
48
  "eslint-plugin-react": "7.37.2",
48
49
  "eslint-plugin-react-hooks": "5.0.0",
@@ -104,7 +105,7 @@
104
105
  "optional": true
105
106
  }
106
107
  },
107
- "packageManager": "yarn@4.5.3",
108
+ "packageManager": "yarn@4.6.0",
108
109
  "engines": {
109
110
  "node": ">=20.0.0"
110
111
  },
@@ -0,0 +1,4 @@
1
+ /** @type {import("@types/eslint").ESLint.ConfigData} */
2
+ module.exports = {
3
+ extends: ["../plugins/playwright.js"],
4
+ }
@@ -0,0 +1,55 @@
1
+ /** @type {import("@types/eslint").ESLint.ConfigData} */
2
+ module.exports = {
3
+ plugins: ["playwright"],
4
+ rules: {
5
+ "playwright/expect-expect": "error",
6
+ "playwright/max-expects": ["error", { max: 10 }],
7
+ "playwright/max-nested-describe": ["error", { max: 4 }],
8
+ "playwright/missing-playwright-await": "error",
9
+ "playwright/no-commented-out-tests": "error",
10
+ "playwright/no-conditional-expect": "error",
11
+ "playwright/no-conditional-in-test": "error",
12
+ "playwright/no-duplicate-hooks": "error",
13
+ "playwright/no-element-handle": "error",
14
+ "playwright/no-eval": "error",
15
+ "playwright/no-focused-test": "error",
16
+ "playwright/no-force-option": "error",
17
+ "playwright/no-get-by-title": "error",
18
+ "playwright/no-nested-step": "error",
19
+ "playwright/no-networkidle": "error",
20
+ "playwright/no-page-pause": "error",
21
+ "playwright/no-raw-locators": "error",
22
+ "playwright/no-skipped-test": "error",
23
+ "playwright/no-standalone-expect": "error",
24
+ "playwright/no-unsafe-references": "error",
25
+ "playwright/no-useless-await": "error",
26
+ "playwright/no-useless-not": "error",
27
+ "playwright/no-wait-for-selector": "error",
28
+ "playwright/no-wait-for-timeout": "error",
29
+ "playwright/prefer-comparison-matcher": "error",
30
+ "playwright/prefer-equality-matcher": "error",
31
+ "playwright/prefer-hooks-in-order": "error",
32
+ "playwright/prefer-hooks-on-top": "error",
33
+ "playwright/prefer-locator": "error",
34
+ "playwright/prefer-lowercase-title": [
35
+ "error",
36
+ {
37
+ ignoreTopLevelDescribe: true,
38
+ },
39
+ ],
40
+ "playwright/prefer-native-locators": "error",
41
+ "playwright/prefer-strict-equal": "error",
42
+ "playwright/prefer-to-be": "error",
43
+ "playwright/prefer-to-contain": "error",
44
+ "playwright/prefer-to-have-count": "error",
45
+ "playwright/prefer-to-have-length": "error",
46
+ "playwright/prefer-web-first-assertions": "error",
47
+ "playwright/require-hook": "error",
48
+ "playwright/require-to-throw-message": "error",
49
+ "playwright/require-top-level-describe": "error",
50
+ "playwright/valid-describe-callback": "error",
51
+ "playwright/valid-expect": "error",
52
+ "playwright/valid-expect-in-promise": "error",
53
+ "playwright/valid-title": "error",
54
+ },
55
+ }