Prettier is a tool with questionable defaults and performance. Not only
is it slow to format files, but it also doesn't respect nested
`.gitignore` or `.prettierignore` files. This means we need to specify
all paths that it should not touch in the top-level .`prettierignore` to
get even close to acceptable performance. Even with these optimisations,
it still takes around 8 seconds to format our workspace.
To avoid burning Azure credits, we move the runners back down to the
free tier. Now that caching is properly set up, this should incur only a
minor increase in CI time.
Only ignoring these in the pre-commit check is not enough as that only
affects CI. Instead, by adding these directories to the
`.prettierignore` file, they are also ignored when prettier is invoked
to format files.
This ensure that we run prettier across all supported filetypes to check
for any formatting / style inconsistencies. Previously, it was only run
for files in the website/ directory using a deprecated pre-commit
plugin.
The benefit to keeping this in our pre-commit config is that devs can
optionally run these checks locally with `pre-commit run --config
.github/pre-commit-config.yaml`.
---------
Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>