ribrdb / desynced-tools

Tools for working with behaviors and blueprints from Desynced.
MIT License
4 stars 3 forks source link

Introduce prettier to format code #69

Closed swazrgb closed 5 months ago

swazrgb commented 5 months ago

This PR consists of three commits:

  1. The commit Introduce prettier which adds the prettier configuration, but has not yet ran it. This commit also updates the github workflow to fail the build if the code has not been formatted properly.
  2. The commit Remove unused compiled code which removes the app/ directory, which seemingly contains old esbuild output. Presumably added by mistake, and can be removed? The website uses the files in website/ which are gitignored.
  3. The commit Run prettier which has actually ran prettier. The diff of this commit is massive, but entirely generated by running npm run format (an alias for npx prettier -w .). All stylistic choices are prettier's defaults, but if you have any preferences (https://prettier.io/docs/en/options.html) let me know and I'll include them in the prettierrc.

Since this commit is so massive, and reformats so much code, it might not be desirable to merge if you have any feature branches open, although any conflicts can be resolved by running prettier on the feature branch as well, then rebasing.

If you wish to merge, or update, this pull request yourself it is probably best to git rebase -i main, drop the Run prettier commit, and regenerate it by running npm run format.