Skip to content

Commit e66cd99

Browse files
authored
chore(project): add eslint plugin for playwright (#3034)
* chore(project): add eslint plugin for playwright * chore: update toBeVisible() check to be await-ed * chore: bump caniuse-lite --------- Co-authored-by: Josh Black <[email protected]>
1 parent 3022082 commit e66cd99

File tree

4 files changed

+34
-11
lines changed

4 files changed

+34
-11
lines changed

.eslintrc.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,8 @@ module.exports = {
178178
parserOptions: {
179179
project: 'tsconfig.json',
180180
},
181-
rules: {
182-
'github/array-foreach': 'off',
183-
},
181+
extends: ['plugin:playwright/jest-playwright'],
182+
rules: {},
184183
},
185184

186185
// rules which apply only to Markdown

e2e/components/DataTable.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ test.describe('DataTable', () => {
178178
const tabIndex = await region.getAttribute('tabindex')
179179
const labelledby = await region.getAttribute('aria-labelledby')
180180

181-
expect(region).toBeVisible()
181+
await expect(region).toBeVisible()
182182
expect(tabIndex).toBe('0')
183183
expect(labelledby).toBe(headingId)
184184

185-
expect(table).toBeVisible()
185+
await expect(table).toBeVisible()
186186
expect(labelledby).toBe(headingId)
187187
})
188188

package-lock.json

Lines changed: 29 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
"eslint-plugin-jest": "27.2.1",
191191
"eslint-plugin-jsx-a11y": "6.7.1",
192192
"eslint-plugin-mdx": "2.0.5",
193+
"eslint-plugin-playwright": "0.12.0",
193194
"eslint-plugin-prettier": "4.2.1",
194195
"eslint-plugin-primer-react": "1.0.1",
195196
"eslint-plugin-react": "7.32.2",

0 commit comments

Comments
 (0)