When generating files with apollo codegen:generate
files are generated with two spaces.
I couldn't find any place where I could define this configuration, e.g. 4 spaces/1 tab.
Thank you.
Looking into the Apollo codegen documentation, it does not seem to accept any param for lint configurations.
But, you could do it yourself after generating the code.
Let's assume you have a script in your package.json
to run apollo codegen:generate
called generate:types
then you can just run you tslint.json
configurations against the generated files, something like:
"scripts": {
"generate:types": "apollo codegen:generate ....",
"generate:types:lint": "tslint --fix -c tslint.json {path-to-your-generated-files}",
"generate": "yarn generate:types && yarn generate:types:lint"
},
And then just run the script yarn generate
.