Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty printing in generated code #13

Open
davegurnell opened this issue Aug 2, 2018 · 1 comment
Open

Pretty printing in generated code #13

davegurnell opened this issue Aug 2, 2018 · 1 comment

Comments

@davegurnell
Copy link
Owner

Some indentation and newlines might be nice...

@davegurnell
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant