Skip to content

Commit 81259f3

Browse files
committed
4.4
1 parent e53ca1f commit 81259f3

18 files changed

Lines changed: 27 additions & 31 deletions

File tree

.eslintrc.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ module.exports = {
3737
rules: {
3838
'@typescript-eslint/array-type': ['error', {default: 'generic'}],
3939
'@typescript-eslint/ban-types': 'error',
40-
'@typescript-eslint/no-implicit-any-catch': [
41-
'error',
42-
{allowExplicitAny: true},
43-
],
4440
'@typescript-eslint/no-unused-vars': [
4541
'error',
4642
{argsIgnorePattern: '^_'},

e2e/__tests__/resolveConditions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ onNodeVersions('>=12.16.0', () => {
2626
});
2727
try {
2828
expect(exitCode).toBe(0);
29-
} catch (error: unknown) {
29+
} catch (error) {
3030
console.log(`Test failed on iteration ${i + 1}`);
3131
throw error;
3232
}

packages/expect/src/__tests__/isError.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('isError', () => {
4343
testErrorFromDifferentContext((win: Window) => {
4444
try {
4545
win.document.querySelectorAll('');
46-
} catch (e: unknown) {
46+
} catch (e) {
4747
return e;
4848
}
4949
return null;

packages/expect/src/toThrowMatchers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const createMatcher = (
107107
} else {
108108
try {
109109
received();
110-
} catch (e: unknown) {
110+
} catch (e) {
111111
thrown = getThrown(e);
112112
}
113113
}

packages/jest-circus/src/run.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ const _callCircusHook = async ({
157157
timeout,
158158
});
159159
await dispatch({describeBlock, hook, name: 'hook_success', test});
160-
} catch (error: unknown) {
160+
} catch (error) {
161161
await dispatch({describeBlock, error, hook, name: 'hook_failure', test});
162162
}
163163
};
@@ -180,7 +180,7 @@ const _callCircusTest = async (
180180
timeout,
181181
});
182182
await dispatch({name: 'test_fn_success', test});
183-
} catch (error: unknown) {
183+
} catch (error) {
184184
await dispatch({error, name: 'test_fn_failure', test});
185185
}
186186
};

packages/jest-circus/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export const callAsyncCircusFn = (
253253
} else {
254254
try {
255255
returnedValue = fn.call(testContext);
256-
} catch (error: unknown) {
256+
} catch (error) {
257257
reject(error);
258258
return;
259259
}

packages/jest-config/src/readConfigFileAndSetRootDir.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default async function readConfigFileAndSetRootDir(
3636
} else {
3737
configObject = await requireOrImportModule<any>(configPath);
3838
}
39-
} catch (error: unknown) {
39+
} catch (error) {
4040
if (isJSON) {
4141
throw new Error(
4242
`Jest: Failed to parse config file ${configPath}\n` +

packages/jest-core/src/TestScheduler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class TestScheduler {
286286
);
287287
}
288288
}
289-
} catch (error: unknown) {
289+
} catch (error) {
290290
if (!watcher.isInterrupted()) {
291291
throw error;
292292
}

packages/jest-core/src/cli/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const _run10000 = async (
175175
filterSetupPromise = (async () => {
176176
try {
177177
await rawFilter.setup();
178-
} catch (err: unknown) {
178+
} catch (err) {
179179
return err;
180180
}
181181
return undefined;

packages/jest-core/src/runGlobalHook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default async ({
5858
await globalModule(globalConfig);
5959
},
6060
);
61-
} catch (error: unknown) {
61+
} catch (error) {
6262
if (util.types.isNativeError(error)) {
6363
error.message = `Jest: Got error running ${moduleName} - ${modulePath}, reason: ${error.message}`;
6464

0 commit comments

Comments
 (0)