Skip to content

Commit 5f4d2f2

Browse files
committed
chore: Format with oxfmt
1 parent 9b6671e commit 5f4d2f2

File tree

75 files changed

+542
-1658
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+542
-1658
lines changed

.oxfmtrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"printWidth": 100,
4+
"singleQuote": true,
5+
"semi": false,
6+
"objectWrap": "preserve",
7+
"quoteProps": "consistent",
8+
"experimentalSortImports": {
9+
"newlinesBetween": false,
10+
"enabled": true
11+
},
12+
"experimentalSortPackageJson": true,
13+
"ignorePatterns": ["dist/", ".yarn/", ".yarnrc.yml"]
14+
}

.prettierignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ runRuleTester('{rule-name}', rule, {
111111

112112
- **TypeScript strict mode** - All code must be properly typed
113113
- **ESLint compliance** - Code must pass the project's own linting rules
114-
- **Prettier formatting** - Consistent code formatting
114+
- **Oxfmt formatting** - Consistent code formatting
115115
- **Comprehensive testing** - Aim for 100% test coverage on new rules
116116

117117
## Key Utilities & APIs
@@ -235,7 +235,7 @@ runRuleTester('{rule-name}', rule, {
235235
- `yarn test:watch` - Run tests in watch mode
236236
- `yarn build` - Build the plugin
237237
- `yarn lint` - Run ESLint
238-
- `yarn format` - Format code with Prettier
238+
- `yarn format` - Format code with oxfmt
239239

240240
### Release Process
241241

docs/rules/missing-playwright-await.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ your own async `expect` matchers.
3434

3535
```json
3636
{
37-
"playwright/missing-playwright-await": [
38-
"error",
39-
{ "customMatchers": ["toBeCustomThing"] }
40-
]
37+
"playwright/missing-playwright-await": ["error", { "customMatchers": ["toBeCustomThing"] }]
4138
}
4239
```

docs/rules/no-conditional-in-test.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ test('bar', async ({ page }) => {
3333
})
3434

3535
test('baz', async ({ page }) => {
36-
const hotkey =
37-
process.platform === 'linux' ? ['Control', 'Alt', 'f'] : ['Alt', 'f']
36+
const hotkey = process.platform === 'linux' ? ['Control', 'Alt', 'f'] : ['Alt', 'f']
3837
await Promise.all(hotkey.map((x) => page.keyboard.down(x)))
3938

4039
expect(actionIsPerformed()).toBe(true)
@@ -70,8 +69,7 @@ test('bar', async ({ page }) => {
7069
await expect(page.locator('.my-image').count()).toBeGreaterThan(0)
7170
})
7271

73-
const hotkey =
74-
process.platform === 'linux' ? ['Control', 'Alt', 'f'] : ['Alt', 'f']
72+
const hotkey = process.platform === 'linux' ? ['Control', 'Alt', 'f'] : ['Alt', 'f']
7573

7674
test('baz', async ({ page }) => {
7775
await Promise.all(hotkey.map((x) => page.keyboard.down(x)))

docs/rules/no-eval.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ Examples of **incorrect** code for this rule:
77
```javascript
88
const searchValue = await page.$eval('#search', (el) => el.value)
99

10-
const divCounts = await page.$$eval(
11-
'div',
12-
(divs, min) => divs.length >= min,
13-
10,
14-
)
10+
const divCounts = await page.$$eval('div', (divs, min) => divs.length >= min, 10)
1511

1612
await page.$eval('#search', (el) => el.value)
1713
await page.$$eval('#search', (el) => el.value)

docs/rules/require-top-level-describe.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ using the `maxTopLevelDescribes` option:
5353

5454
```json
5555
{
56-
"playwright/require-top-level-describe": [
57-
"error",
58-
{ "maxTopLevelDescribes": 2 }
59-
]
56+
"playwright/require-top-level-describe": ["error", { "maxTopLevelDescribes": 2 }]
6057
}
6158
```
6259

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ declare const config: {
44
configs: {
55
'flat/recommended': Linter.Config
66
'playwright-test': Linter.Config
7-
recommended: Linter.Config
7+
'recommended': Linter.Config
88
}
99
rules: Record<string, Rule.RuleModule>
1010
}

package.json

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
{
22
"name": "eslint-plugin-playwright",
3-
"description": "ESLint plugin for Playwright testing.",
43
"version": "0.0.0-semantically-released",
5-
"repository": {
6-
"type": "git",
7-
"url": "git+https://github.com/mskelton/eslint-plugin-playwright.git"
8-
},
4+
"description": "ESLint plugin for Playwright testing.",
5+
"license": "MIT",
96
"author": "Mark Skelton <[email protected]>",
10-
"packageManager": "[email protected]",
117
"contributors": [
128
"Max Schmitt <[email protected]>"
139
],
14-
"license": "MIT",
15-
"engines": {
16-
"node": ">=16.9.0"
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/mskelton/eslint-plugin-playwright.git"
1713
},
14+
"files": [
15+
"dist",
16+
"index.cjs",
17+
"index.d.ts",
18+
"index.js"
19+
],
1820
"type": "module",
1921
"types": "./index.d.ts",
2022
"exports": {
@@ -24,24 +26,15 @@
2426
"require": "./index.cjs"
2527
}
2628
},
27-
"files": [
28-
"dist",
29-
"index.js",
30-
"index.cjs",
31-
"index.d.ts"
32-
],
3329
"scripts": {
3430
"build": "tsup src/index.ts --format cjs --out-dir dist",
3531
"lint": "eslint .",
36-
"format": "prettier --write .",
37-
"format:check": "prettier --check .",
32+
"format": "oxfmt .",
33+
"format:check": "oxfmt --check .",
3834
"test": "vitest --hideSkippedTests",
3935
"test:watch": "vitest --reporter=dot",
4036
"ts": "tsc --noEmit"
4137
},
42-
"peerDependencies": {
43-
"eslint": ">=8.40.0"
44-
},
4538
"dependencies": {
4639
"globals": "^16.4.0"
4740
},
@@ -52,11 +45,17 @@
5245
"@typescript-eslint/parser": "^8.11.0",
5346
"dedent": "^1.5.1",
5447
"eslint": "^9.13.0",
55-
"prettier": "^3.0.3",
56-
"prettier-plugin-jsdoc": "^1.3.0",
48+
"oxfmt": "^0.23.0",
5749
"semantic-release": "^25.0.2",
5850
"tsup": "^8.0.1",
5951
"typescript": "^5.2.2",
6052
"vitest": "^1.6.1"
61-
}
53+
},
54+
"peerDependencies": {
55+
"eslint": ">=8.40.0"
56+
},
57+
"engines": {
58+
"node": ">=16.9.0"
59+
},
60+
"packageManager": "[email protected]"
6261
}

0 commit comments

Comments
 (0)