forgejo/tests/e2e/.eslintrc.yaml
Gusted 40baa96fc3
[CHORE] Add playwright eslint plugin
- Add https://github.com/playwright-community/eslint-plugin-playwright
as a linter for the playwright tests.
- `no-networkidle` and `no-conditional-in-test` are disabled as fixing
those doesn't seem to really improve testing quality for our use case.
- Some non-recommended linters are enabled to ensure consistency (the
prefer rules).
2024-07-22 20:03:32 +02:00

23 lines
535 B
YAML

plugins:
- eslint-plugin-playwright
extends:
- ../../.eslintrc.yaml
- plugin:playwright/recommended
parserOptions:
sourceType: module
ecmaVersion: latest
env:
browser: true
rules:
playwright/no-conditional-in-test: [0]
playwright/no-networkidle: [0]
playwright/no-skipped-test: [2, {allowConditional: true}]
playwright/prefer-comparison-matcher: [2]
playwright/prefer-equality-matcher: [2]
playwright/prefer-to-contain: [2]
playwright/prefer-to-have-length: [2]
playwright/require-to-throw-message: [2]