Pretty printing in generated code
davegurnell opened this issue · 1 comments
davegurnell commented
Some indentation and newlines might be nice...
davegurnell commented
More on this. In most TypeScript projects I now set up an NPM/Yarn script to run prettier on any generated files. For reference, the script typically looks like this:
// package.json
{
// ...other config goes here...
"scripts": {
"format:generated": "yarn prettier --write \"src/**/*.generated.ts\""
},
// ...other config goes here...
}
My impression is that most JS/TS codebases use prettier these days. Imitating its formatting in Scala seems impractical.