Closed kbrandwijk closed 6 years ago
TSLint also offers a configuration option to ignore a certain folder (in this case: generated), either using the --exclude
command line option, of the exclude
node in your tsconfig.json
.
I think that would be a better solution than adding these types of statements to the files.Tslint is not the only linter out there, and I don't want to end up with 10 different ignore statements in my generated files.
Yeah, that's probably better given your rationale of there being more than one linter out there.
exclude node in your tsconfig.json
That wouldn't work - as you actually want the files to be transpiled, just not linted. I've added an --exclude
to the tslint command.
@philcockfield Sorry, I meant tslint.json
not tsconfig.json
...
"cliOptions": {
"exclude": [
"src/generated",
]
}
Closing this, as the alternative to configure this for tslint is known, and I'm not going to put something in the generated file.
From @philcockfield on January 8, 2018 17:48
With GraphCool 1.0 a TypeScript file is generated locally after deploy:
This produces typescript that may conflict with the projects
tslint.json
rules. Can you include adirective at the top of the generated file to exclude it from the projects linting output, please?
Thanks.
Copied from original issue: graphcool/graphcool#1543