Skip to content

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