Auto Formatting Code Using Prettier and GitHub Actions

Prettier and GitHub Actions logos

Prettier is a very popular code formatter which uses very opinionated but sensible styles to format your code and prevent the ongoing debates about code styles. When implementing Prettier into a project, the typical approach is to setup a pre-commit hook using a tool such as lint-staged which will run Prettier on your staged files prior to committing. While this works well in most cases, there…