Skip to content

Commit b08b05a

Browse files
Update eslint/prettier (#759)
1 parent 9d0669b commit b08b05a

File tree

7 files changed

+173
-174
lines changed

7 files changed

+173
-174
lines changed

package-lock.json

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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"@types/jest": "29.5.12",
3535
"@types/node": "16.18.34",
3636
"@types/polka": "0.5.7",
37-
"@typescript-eslint/eslint-plugin": "6.4.1",
38-
"@typescript-eslint/parser": "6.4.1",
37+
"@typescript-eslint/eslint-plugin": "6.21.0",
38+
"@typescript-eslint/parser": "6.21.0",
3939
"@vue/compiler-sfc": "3.3.4",
4040
"ansi-regex": "6.0.1",
4141
"aria-query": "5.1.3",
@@ -44,7 +44,7 @@
4444
"dom-accessibility-api": "0.6.1",
4545
"errorstacks": "2.4.1",
4646
"es-jest": "2.1.0",
47-
"eslint": "8.47.0",
47+
"eslint": "8.57.0",
4848
"jest": "29.7.0",
4949
"jest-environment-jsdom": "29.7.0",
5050
"kolorist": "1.8.0",
@@ -53,7 +53,7 @@
5353
"mime": "4.0.4",
5454
"polka": "0.5.2",
5555
"preact": "10.15.1",
56-
"prettier": "3.0.2",
56+
"prettier": "3.3.3",
5757
"pretty-format": "29.7.0",
5858
"prop-types": "15.8.1",
5959
"react": "18.2.0",

src/jest-dom/index.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,12 @@ const runUtilInNode = (name: string, args: any[]) => {
3434
return `$JEST_UTILS.${name}$${stringifiedArgs}$END_JEST_UTILS$`;
3535
};
3636

37-
type RecursivePartial<T> = T extends Record<string, unknown>
38-
? T extends () => any
39-
? T
40-
: {
41-
[K in keyof T]?: RecursivePartial<T[K]>;
42-
}
43-
: T;
37+
type RecursivePartial<T> =
38+
T extends Record<string, unknown>
39+
? T extends () => any
40+
? T
41+
: { [K in keyof T]?: RecursivePartial<T[K]> }
42+
: T;
4443

4544
export const jestContext: RecursivePartial<jest.MatcherUtils> = {
4645
equals: (a, b) =>

src/module-server/client-runtime-server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ const clientRuntimeMiddleware =
3535
req.path === '/@pleasantest/jest-dom'
3636
? 'jest-dom.js'
3737
: req.path === '/@pleasantest/user-util'
38-
? 'user-util.js'
39-
: req.path === '/@pleasantest/accessibility'
40-
? 'accessibility.js'
41-
: 'pptr-testing-library-client.js',
38+
? 'user-util.js'
39+
: req.path === '/@pleasantest/accessibility'
40+
? 'accessibility.js'
41+
: 'pptr-testing-library-client.js',
4242
);
4343
const text = await fs.readFile(filePath, 'utf8');
4444
res.end(text);

src/pptr-testing-library.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import {
1212
type ElementToElementHandle<Input> = Input extends Element
1313
? ElementHandle<Input>
1414
: Input extends (Element | ElementHandle)[]
15-
? { [K in keyof Input]: ElementToElementHandle<Input[K]> }
16-
: Input;
15+
? { [K in keyof Input]: ElementToElementHandle<Input[K]> }
16+
: Input;
1717

1818
type Promisify<Input> = Input extends Promise<any> ? Input : Promise<Input>;
1919
type ValueOf<Input> = Input extends any[] ? Input[number] : Input[keyof Input];

src/serialize/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ export const printElement = (
156156
attr.value.length > 40 && attr.name === 'd' && tagName === 'path'
157157
? `${attr.value.slice(0, 30)}[...]`
158158
: attr.value.length > 150
159-
? `${attr.value.slice(0, 150)}[...]`
160-
: attr.value;
159+
? `${attr.value.slice(0, 150)}[...]`
160+
: attr.value;
161161
return `${highlight.attribute(attr.name)}${highlight.equals(
162162
'=',
163163
)}${highlight.string(`"${truncatedAttrValue}"`)}`;
@@ -166,8 +166,8 @@ export const printElement = (
166166
selfClosing
167167
? highlight.bracket(`${splitAttrs ? '\n' : ' '}/`)
168168
: splitAttrs
169-
? '\n'
170-
: ''
169+
? '\n'
170+
: ''
171171
}${highlight.bracket('>')}${
172172
selfClosing
173173
? ''

tests/testing-library-queries/variants-of-queries.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ type Equal<A, B> = A extends (infer T1)[]
2222
? Equal<T1, T2>
2323
: false
2424
: A extends ElementHandle<infer T1>
25-
? B extends ElementHandle<infer T2>
26-
? Equal<T1, T2>
27-
: false
28-
: B extends A
29-
? A extends B
30-
? true
31-
: false
32-
: false;
25+
? B extends ElementHandle<infer T2>
26+
? Equal<T1, T2>
27+
: false
28+
: B extends A
29+
? A extends B
30+
? true
31+
: false
32+
: false;
3333

3434
test(
3535
'findBy',

0 commit comments

Comments
 (0)