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

Use the Prettier transform for all subgens #9367

Closed
PierreBesson opened this issue Mar 3, 2019 · 2 comments
Closed

Use the Prettier transform for all subgens #9367

PierreBesson opened this issue Mar 3, 2019 · 2 comments

Comments

@PierreBesson
Copy link
Contributor

Overview of the feature request

Following this PR #9281 from @Fydon, we have prettierisation of YAML files for the main generator.

I'm proposing to add this transform to all our subgens and especially for the Kubernetes related subgens which use a lot of YAML. The v6 release is a good time to do this.

However there is something to be aware of : this will change the indentation style for lists. Currently with the Kubernetes subgen, our lists are indented like this :

spec:
  containers:
  - name: app

With prettier, it will be indented like this :

spec:
  containers:
    - name: app
Motivation for or Use Case
  • Not having to think too much about formating of the templates
  • Being able to catch invalid YAML in CI and suggest a fix
@cbornet
Copy link
Member

cbornet commented Mar 4, 2019

In that case we should match the prettier style when generating the kube yaml.

@PierreBesson
Copy link
Contributor Author

So apparently there was a vote on prettier/prettier#4723 and the behavior cannot be configured for now. The indented version looks fine for me and I think it's good to enforce conventions automatically.

@jdubois jdubois added this to the 6.0.0-beta.0 milestone Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants