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

Run prettier in yaml and md files #2746

Merged
merged 1 commit into from
May 3, 2021
Merged

Conversation

antgamdia
Copy link
Contributor

Description of the change

This PR is simply the result of running the pretter tool that we already have configured when committing files under the dashboard folder in the rest of *.md and *.yaml files we currently have on the projet.

Benefits

When sending additional PRs where prettier is being run, we won't have so many changes to review.

Possible drawbacks

N/A

Applicable issues

N/A

Additional information

It has been executed using the default configuration. Also, it could be a good idea to automatically run prettier as we are already doing for the dashboard.
Perhaps we can do it as part of the changes required for #2617.

Copy link
Contributor

@absoludity absoludity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not checked all changes, given they're all mechanical.

@absoludity
Copy link
Contributor

Also, it could be a good idea to automatically run prettier as we are already doing for the dashboard.
Perhaps we can do it as part of the changes required for #2617.

+1 to automatically run prettier and I don't mind if you do that via husky, but let's not rely on that (ie. rely on a local user-setup to ensure the tool is run). In the past, I've tried to ensure that the dev image build will fail if things like the prettier-check run here: https://github.com/kubeapps/kubeapps/blob/master/dashboard/Dockerfile#L9 fail. I don't have the husky git hooks enabled (I don't particularly trust npm code to the degree that I want to automatically run it on my local machine as my user), but I want to be sure that I (or any other user) can't land code that contributes to the problem, which is why I did #1836 .

@antgamdia
Copy link
Contributor Author

Mmm, I see. That's totally understandable. Even I sometimes commit files using the --no-verify flag.
If we really want to enforce the usage of these tools, they should be at "server-side", for instance, using GitHub Actions: https://github.com/marketplace/actions/prettier-action
Let me file an issue to track and evaluate it.

@antgamdia antgamdia merged commit a90911b into vmware-tanzu:master May 3, 2021
@antgamdia antgamdia deleted the prettier branch May 4, 2021 14:09
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

Successfully merging this pull request may close these issues.

None yet

2 participants