Skip to content

Commit 345be3f

Browse files
chore(deps-dev): bump @callstack/eslint-config from 14.2.0 to 15.0.0 (#1650)
* chore(deps-dev): bump @callstack/eslint-config from 14.2.0 to 15.0.0 Bumps [@callstack/eslint-config](https://github.com/callstack/eslint-config-callstack) from 14.2.0 to 15.0.0. - [Release notes](https://github.com/callstack/eslint-config-callstack/releases) - [Commits](callstack/eslint-config-callstack@v14.2.0...v15.0.0) --- updated-dependencies: - dependency-name: "@callstack/eslint-config" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore: fix lint issues --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Maciej Jastrzebski <[email protected]>
1 parent 22ec13d commit 345be3f

9 files changed

+122
-219
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"@babel/preset-flow": "^7.24.7",
7171
"@babel/preset-react": "^7.24.7",
7272
"@babel/preset-typescript": "^7.24.7",
73-
"@callstack/eslint-config": "^14.2.0",
73+
"@callstack/eslint-config": "^15.0.0",
7474
"@release-it/conventional-changelog": "^8.0.1",
7575
"@relmify/jest-serializer-strip-ansi": "^1.0.2",
7676
"@types/jest": "^29.5.12",

src/__tests__/render-hook.test.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
22
import TestRenderer from 'react-test-renderer';
33
import { renderHook } from '../pure';
44

5-
test('gives comitted result', () => {
5+
test('gives committed result', () => {
66
const { result } = renderHook(() => {
77
const [state, setState] = React.useState(1);
88

@@ -22,13 +22,11 @@ test('allows rerendering', () => {
2222
const [left, setLeft] = React.useState('left');
2323
const [right, setRight] = React.useState('right');
2424

25-
// eslint-disable-next-line jest/no-if
2625
switch (props.branch) {
2726
case 'left':
2827
return [left, setLeft];
2928
case 'right':
3029
return [right, setRight];
31-
3230
default:
3331
throw new Error('No Props passed. This is a bug in the implementation');
3432
}
@@ -64,7 +62,7 @@ const useMyHook = (param: number | undefined) => {
6462
return param;
6563
};
6664

67-
test('props type is infered correctly when initial props is defined', () => {
65+
test('props type is inferred correctly when initial props is defined', () => {
6866
const { result, rerender } = renderHook((num: number | undefined) => useMyHook(num), {
6967
initialProps: 5,
7068
});

src/__tests__/wait-for-element-to-be-removed.test.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ test('waits with custom interval', async () => {
114114
timeout: 600,
115115
interval: 200,
116116
});
117-
} catch (e) {
117+
} catch {
118118
// Suppress expected error
119119
}
120120

@@ -133,7 +133,7 @@ test.each([false, true])(
133133
timeout: 400,
134134
interval: 200,
135135
});
136-
} catch (e) {
136+
} catch {
137137
// Suppress expected error
138138
}
139139

src/__tests__/wait-for.test.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ test('waits for element with custom interval', async () => {
9191

9292
try {
9393
await waitFor(() => mockFn(), { timeout: 400, interval: 200 });
94-
} catch (e) {
94+
} catch {
9595
// suppress
9696
}
9797

@@ -160,7 +160,7 @@ test.each([false, true])(
160160

161161
try {
162162
await waitFor(() => mockFn(), { timeout: 400, interval: 200 });
163-
} catch (error) {
163+
} catch {
164164
// suppress
165165
}
166166

@@ -185,7 +185,7 @@ test.each([false, true])(
185185
interval: 200,
186186
onTimeout: mockHandleFn,
187187
});
188-
} catch (error) {
188+
} catch {
189189
// suppress
190190
}
191191

@@ -248,7 +248,7 @@ test.each([false, true])(
248248

249249
try {
250250
await waitFor(() => mockFn(), { timeout: 400, interval: 200 });
251-
} catch (error) {
251+
} catch {
252252
// suppress
253253
}
254254

src/matchers/utils.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class HostElementTypeError extends Error {
2525
try {
2626
withType = printWithType('Received', received, printReceived);
2727
/* istanbul ignore next */
28-
} catch (e) {
28+
} catch {
2929
// Deliberately empty.
3030
}
3131

src/queries/unsafe-props.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const UNSAFE_queryAllByProps =
4646
(props: { [propName: string]: any }) => {
4747
try {
4848
return UNSAFE_getAllByProps(instance)(props);
49-
} catch (error) {
49+
} catch {
5050
return [];
5151
}
5252
};

src/queries/unsafe-type.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const UNSAFE_queryAllByType =
4141
(type: React.ComponentType<any>) => {
4242
try {
4343
return UNSAFE_getAllByType(instance)(type);
44-
} catch (error) {
44+
} catch {
4545
return [];
4646
}
4747
};

src/wait-for-element-to-be-removed.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default async function waitForElementToBeRemoved<T>(
2929
let result;
3030
try {
3131
result = expectation();
32-
} catch (error) {
32+
} catch {
3333
return initialElements;
3434
}
3535

0 commit comments

Comments
 (0)