diff --git a/.eslintrc.cjs b/.eslintrc.cjs index ae7644b57..79a36054f 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -76,6 +76,16 @@ module.exports = { project: ['./tsconfig.packages.json'], }, rules: { + '@typescript-eslint/explicit-function-return-type': [ + 'error', + { + // To permit omitting the return type in situations like: + // `const obj = { foo: (bar: string) => bar };` + // We'll presume that `obj` has a type that enforces the return type. + allowExpressions: true, + }, + ], + '@typescript-eslint/no-explicit-any': 'error', // This rule is broken, and without the `allowAny` option, it reports a lot diff --git a/packages/shims/src/vitest-environment-endoified.ts b/packages/shims/src/vitest-environment-endoified.ts index 63a817387..1f0131bc6 100644 --- a/packages/shims/src/vitest-environment-endoified.ts +++ b/packages/shims/src/vitest-environment-endoified.ts @@ -13,8 +13,9 @@ export default { clearTimeout, }); }, - // eslint-disable-next-line no-empty-function - teardown(): void {}, + teardown(): void { + return undefined; + }, }; }, async setup() {