Skip to content

Commit

Permalink
chore: fix eslint errors (#18587)
Browse files Browse the repository at this point in the history
```
/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
```
  • Loading branch information
aqrln committed Apr 14, 2023
1 parent 647bd20 commit 878c84f
Showing 1 changed file with 4 additions and 7 deletions.
@@ -1,5 +1,6 @@
import { db } from 'db'

// eslint-disable-next-line @typescript-eslint/require-await
export async function generateStaticParams() {
return [{ id: '1' }]
}
Expand All @@ -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 (
<div>
{`${await doPrismaQuery(params)}`}
</div>
);
return <div>{await doPrismaQuery(params)}</div>
}

0 comments on commit 878c84f

Please sign in to comment.