Eslint errors
After adding the
generator client {
provider = "prisma-client-js"
output = "./prismaGenerated/client"
}
i was force to update my esling config file to exclude lot of checks because i received more than 15K errors:
'object-curly-spacing': 0,
'no-undef': 0,
'@typescript-eslint/no-unused-expressions': 0,
'no-constant-binary-expression': 0,
'no-empty': 0,
'@typescript-eslint/no-this-alias': 0,
'no-redeclare': 0,
'no-prototype-builtins': 0,
'no-cond-assign': 0,
'no-useless-escape': 0,
'getter-return': 0,
'no-extra-boolean-cast': 0,
'@typescript-eslint/no-unnecessary-type-constraint': 0,
'@typescript-eslint/no-unsafe-function-type': 0,
'@typescript-eslint/no-wrapper-object-types': 0,
should be new generated files added to github repository or should them be excluded?
5 Replies
You're in no rush, so we'll let a dev step in. Enjoy your coffee, or drop into
#ask-ai
if you get antsy for a second opinion!you should add the generated directory path to your
.gitignore
file.Hey!
Yes, the generated client should be added to
.gitignore
https://www.prisma.io/docs/orm/prisma-schema/overview/generators#3-exclude-the-generated-directory-from-version-controlGenerators (Reference) | Prisma Documentation
Generators in your Prisma schema specify what assets are generated when the
prisma generate
command is invoked. This page explains how to configure generators.@Nurul (Prisma) i added to .gitignore. The eslint problem is still there... i was forced to add the listed parameter to exlcude eslint checks, not a good solution at all...

add it to the eslint (and tsconfig) ignore as well
..and to pretty much every ignore file you can, since you can look at this like a part of node_modules