diff --git a/package.json b/package.json index 6ff2298..758e56b 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsx-a11y": "^6.8.0", - "eslint-plugin-playwright": "^1.1.0", + "eslint-plugin-playwright": "^1.2.0", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 97974e9..65ccb41 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ dependencies: specifier: ^6.8.0 version: 6.8.0(eslint@8.56.0) eslint-plugin-playwright: - specifier: ^1.1.0 - version: 1.1.0(eslint@8.56.0) + specifier: ^1.2.0 + version: 1.2.0(eslint@8.56.0) eslint-plugin-react: specifier: ^7.33.2 version: 7.33.2(eslint@8.56.0) @@ -1701,11 +1701,11 @@ packages: object.fromentries: 2.0.7 dev: false - /eslint-plugin-playwright@1.1.0(eslint@8.56.0): - resolution: {integrity: sha512-HYh91H2I5Tf7HZ2LNnP7l9bRbharWomN1RzXMA/8KcTf1UDoc7OJxulny2O5QWxghBJk0MoElG6sil0fkPwnSA==} + /eslint-plugin-playwright@1.2.0(eslint@8.56.0): + resolution: {integrity: sha512-D7kY1gutJx5VWrqev4DmUs1HVTItR0iVjCAZl7PG4xI7G+amtjvvuM6EzWUL433JUH9vMk1e5afh53A5pHXWfg==} engines: {node: '>=16.6.0'} peerDependencies: - eslint: '>=7' + eslint: '>=8.40.0' eslint-plugin-jest: '>=25' peerDependenciesMeta: eslint-plugin-jest: diff --git a/src/configs/playwright.ts b/src/configs/playwright.ts index 643f3c2..2665655 100644 --- a/src/configs/playwright.ts +++ b/src/configs/playwright.ts @@ -44,6 +44,11 @@ const playwrightRules: FlatConfigItem['rules'] = { 'playwright/no-wait-for-selector': 'error', 'playwright/no-get-by-title': 'warn', 'playwright/no-unsafe-references': 'error', + 'playwright/no-conditional-expect': 'error', + 'playwright/no-duplicate-hooks': 'error', + 'playwright/no-standalone-expect': 'error', + 'playwright/prefer-hooks-in-order': 'error', + 'playwright/prefer-hooks-on-top': 'error', }