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

Add prettier to have consistent formatting across multiple changes #379

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

phiilu
Copy link
Contributor

@phiilu phiilu commented Mar 1, 2023

Hey everyone!

I thought it might be a very good idea to add prettier to this project so that the JSON files are all formatted the same way no matter who edited them.

This has some advantages to it:

  • contributors don't need to care about indenting JSON files the right way
  • changes in git diffs are always relevant changes and have nothing to do with indentation or formatting

In order to ensure that I added a GitHub action that will automatically run when a new pull request to master/main is created or when directly pushed to main or master.

The workflow would need write permissions to be able to commit the prettified files. This can be enabled in the Repo's settings:
image

That many changes look scary I know, but they are only showing what the result will be. I could also only add the GitHub workflow configuration file to this PR and let the GitHub action format the files one the next Pull Request that will get merged. This way there will only be one new file added with this Pull Request.

Would love your opinions on this!

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.

1 participant