Skip to content

Commit ba82509

Browse files
committed
feat!: Remove jest-playwright configs
1 parent 591692d commit ba82509

File tree

8 files changed

+50
-246
lines changed

8 files changed

+50
-246
lines changed

Diff for: README.md

+6-50
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,11 @@ pnpm add -D eslint-plugin-playwright
2828

2929
## Usage
3030

31-
This plugin bundles two configurations to work with both `@playwright/test` or
32-
`jest-playwright`. The recommended setup is to use the `files` field to target
33-
only Playwright test files. In the examples below, this is done by targeting
34-
files in the `tests` directory and only applying the Playwright rules to those
35-
files. In your project, you may need to change the `files` field to match your
36-
Playwright test file patterns.
37-
38-
### With [Playwright test runner](https://playwright.dev/docs/writing-tests)
31+
The recommended setup is to use the `files` field to target only Playwright test
32+
files. In the examples below, this is done by targeting files in the `tests`
33+
directory and only applying the Playwright rules to those files. In your
34+
project, you may need to change the `files` field to match your Playwright test
35+
file patterns.
3936

4037
[Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new)
4138
(**eslint.config.js**)
@@ -47,10 +44,8 @@ export default [
4744
{
4845
...playwright.configs['flat/recommended'],
4946
files: ['tests/**'],
50-
},
51-
{
52-
files: ['tests/**'],
5347
rules: {
48+
...playwright.configs['flat/recommended'].rules,
5449
// Customize Playwright rules
5550
// ...
5651
},
@@ -72,45 +67,6 @@ export default [
7267
}
7368
```
7469

75-
### With [Jest Playwright](https://github.com/playwright-community/jest-playwright)
76-
77-
[Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new)
78-
(**eslint.config.js**)
79-
80-
```javascript
81-
import playwright from 'eslint-plugin-playwright'
82-
import jest from 'eslint-plugin-jest'
83-
84-
export default [
85-
{
86-
...playwright.configs['flat/jest-playwright'],
87-
files: ['tests/**'],
88-
},
89-
{
90-
files: ['tests/**'],
91-
plugins: { jest },
92-
rules: {
93-
// Customize Playwright rules
94-
// ...
95-
},
96-
},
97-
]
98-
```
99-
100-
[Legacy config](https://eslint.org/docs/latest/use/configure/configuration-files)
101-
(**.eslintrc**)
102-
103-
```json
104-
{
105-
"overrides": [
106-
{
107-
"files": "tests/**",
108-
"extends": "plugin:playwright/jest-playwright"
109-
}
110-
]
111-
}
112-
```
113-
11470
## Settings
11571

11672
### Aliased Playwright Globals

Diff for: index.d.ts

-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import { Linter, Rule } from 'eslint'
22

33
declare const config: {
44
configs: {
5-
'flat/jest-playwright': Linter.Config
65
'flat/recommended': Linter.Config
7-
'jest-playwright': Linter.Config
86
'playwright-test': Linter.Config
97
recommended: Linter.Config
108
}

Diff for: package.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,7 @@
3838
"ts": "tsc --noEmit"
3939
},
4040
"peerDependencies": {
41-
"eslint": ">=8.40.0",
42-
"eslint-plugin-jest": ">=25"
43-
},
44-
"peerDependenciesMeta": {
45-
"eslint-plugin-jest": {
46-
"optional": true
47-
}
41+
"eslint": ">=8.40.0"
4842
},
4943
"dependencies": {
5044
"globals": "^13.23.0"

Diff for: packages/eslint-plugin-jest-playwright/README.md

-6
This file was deleted.

Diff for: packages/eslint-plugin-jest-playwright/index.js

-7
This file was deleted.

Diff for: packages/eslint-plugin-jest-playwright/package.json

-15
This file was deleted.

0 commit comments

Comments
 (0)