Based on this: https://github.com/dotansimha/graphql-code-generator/issues/1786#issuecomment-491596405
Similar to @mehmetnyarar https://github.com/dotansimha/graphql-code-generator/issues/1786#issuecomment-491572790
I currently use the add plugin to add any lint ignore lines. This works well and people can choose the level of linting or ignore they want.
generates:
src/generated/generated-models.tsx:
plugins:
- add: "// tslint:disable max-line-length"
- add: "// tslint:disable no-namespace"
- add: "// tslint:disable max-classes-per-file"
- add: "// tslint:disable trailing-comma"
- add: "// tslint:disable no-string-literal"
- add: "// tslint:disable no-shadowed-variable array-type"
# - add: '/* eslint-disable */'
- "typescript"
- "typescript-operations"
- "typescript-react-apollo"
I've used the add plugin and indeed I see the additional linter exceptions added to the generated file, but I still cannot compile the project as it gives me the same error.
We decided to leave it as-is, because of the complexity of finding out which linter is in use. Just use add plugin.
Most helpful comment
Similar to @mehmetnyarar https://github.com/dotansimha/graphql-code-generator/issues/1786#issuecomment-491572790
I currently use the add plugin to add any lint ignore lines. This works well and people can choose the level of linting or ignore they want.