I usually like formatters in pre-commit hooks in addition to editors, rather than in CI. This PR enables that for leptosfmt using the pre-commit framework.
Pre-commit doesn't allow building workspace rust projects, which severely limits the usability of the rust type. The usual workaround (as seen in this issue) is to just use a docker type. So I also added a Dockerfile that builds and runs leptosfmt which I hope can be useful for more than just pre-commit.
I also added a very short section to the readme with usage instructions.
Hi, thanks for making leptosfmt!
I usually like formatters in pre-commit hooks in addition to editors, rather than in CI. This PR enables that for leptosfmt using the pre-commit framework.
Pre-commit doesn't allow building workspace rust projects, which severely limits the usability of the
rust
type. The usual workaround (as seen in this issue) is to just use adocker
type. So I also added aDockerfile
that builds and runs leptosfmt which I hope can be useful for more than just pre-commit.I also added a very short section to the readme with usage instructions.
I`m happy to follow up with any required changes