pre-commit is great tool to run these kind of auto-formatters in isolated environments. There are more hooks which are supported, but I haven't introduced any new ones for now. I just moved 2 packages that were already used here, and use the GitHub action to run them on CI.
The step further is to use pre-commit.ci which has a couple of extra features:
auto-fixes PRs where possible
keep hooks up to date
does very aggressive caching, which means it runs super fast
However, this requires a maintainer to sign-up, and I appreciate that it's yet another service.
pre-commit is great tool to run these kind of auto-formatters in isolated environments. There are more hooks which are supported, but I haven't introduced any new ones for now. I just moved 2 packages that were already used here, and use the GitHub action to run them on CI.
The step further is to use pre-commit.ci which has a couple of extra features:
However, this requires a maintainer to sign-up, and I appreciate that it's yet another service.