Cauen / prisma-generator-pothos-codegen

The fastest way to create a fully customizable CRUD Graphql API from Prisma Schema.
https://www.npmjs.com/package/prisma-generator-pothos-codegen
95 stars 16 forks source link

Silence typescript errors #25

Closed pedrosimao closed 1 year ago

pedrosimao commented 1 year ago

Currently I am getting multiple typescript warnings and errors on the generated files, because my typescript es-lint configuration is more strict than the library is. I actually want to keep it restrictive, because it helps me stay on the safe side. The warnings I am having the most are these:

'_info' is defined but never used @typescript-eslint/no-unused-vars

Also some errors like:

15:29 error Don't useFunctionas a type. TheFunctiontype accepts any function-like value. It provides no type safety when calling the function, which can be a common source of bugs.

It would be awesome if there is a method to automatically add disable comments and on the longterm make the code more strict. Do you think it would be feasable?

Cauen commented 1 year ago

Hi @pedrosimao

Wouldn't it be the case of just disabling eslint in the generation folder?