From 878c84f5992ecef99e5922e8986dfcd058147171 Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Fri, 14 Apr 2023 11:14:03 +0200 Subject: [PATCH] chore: fix eslint errors (#18587) ``` /Users/aqrln/prisma/prisma/packages/client/src/__tests__/integration/happy/signals/__helpers__/client.ts 9:3 error Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator @typescript-eslint/no-floating-promises /Users/aqrln/prisma/prisma/packages/client/src/generation/Cache.test.ts 32:20 error Replace toBeCalledTimes() with its canonical name of toHaveBeenCalledTimes() jest/no-alias-methods 41:20 error Replace toBeCalledTimes() with its canonical name of toHaveBeenCalledTimes() jest/no-alias-methods /Users/aqrln/prisma/prisma/packages/client/src/runtime/core/compositeProxy/cacheProperties.test.ts 18:28 error Replace toBeCalledTimes() with its canonical name of toHaveBeenCalledTimes() jest/no-alias-methods 59:28 error Replace toBeCalledTimes() with its canonical name of toHaveBeenCalledTimes() jest/no-alias-methods /Users/aqrln/prisma/prisma/packages/client/tests/e2e/nextjs-schema-not-found/18_monorepo-serverComponents-customOutput-reExportIndirect-ts/packages/service/app/test/[id]/page.tsx 3:8 error Async function 'generateStaticParams' has no 'await' expression @typescript-eslint/require-await /Users/aqrln/prisma/prisma/packages/client/tests/functional/relationMode-in-separate-gh-action/tests_m-to-n.ts 1:1 error Run autofix to sort these imports! simple-import-sort/imports /Users/aqrln/prisma/prisma/packages/engine-core/src/tracing/index.ts 1:1 error Run autofix to sort these exports! simple-import-sort/exports /Users/aqrln/prisma/prisma/packages/internals/src/utils/callOnce.test.ts 20:19 error Replace toBeCalledTimes() with its canonical name of toHaveBeenCalledTimes() jest/no-alias-methods 30:19 error Replace toBeCalledTimes() with its canonical name of toHaveBeenCalledTimes() jest/no-alias-methods ``` --- .../packages/service/app/test/[id]/page.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/client/tests/e2e/nextjs-schema-not-found/18_monorepo-serverComponents-customOutput-reExportIndirect-ts/packages/service/app/test/[id]/page.tsx b/packages/client/tests/e2e/nextjs-schema-not-found/18_monorepo-serverComponents-customOutput-reExportIndirect-ts/packages/service/app/test/[id]/page.tsx index 28a6b8cb88c6..6867e7e8b831 100644 --- a/packages/client/tests/e2e/nextjs-schema-not-found/18_monorepo-serverComponents-customOutput-reExportIndirect-ts/packages/service/app/test/[id]/page.tsx +++ b/packages/client/tests/e2e/nextjs-schema-not-found/18_monorepo-serverComponents-customOutput-reExportIndirect-ts/packages/service/app/test/[id]/page.tsx @@ -1,5 +1,6 @@ import { db } from 'db' +// eslint-disable-next-line @typescript-eslint/require-await export async function generateStaticParams() { return [{ id: '1' }] } @@ -10,17 +11,13 @@ async function doPrismaQuery(params) { await db.user.deleteMany() const user = await db.user.create({ data: { - email: 'test' - } + email: 'test', + }, }) return JSON.stringify(user) } export default async function Page({ params }) { - return ( -
- {`${await doPrismaQuery(params)}`} -
- ); + return
{await doPrismaQuery(params)}
}