Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-commit hook #150

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add pre-commit hook #150

wants to merge 2 commits into from

Conversation

huuff
Copy link

@huuff huuff commented Oct 12, 2024

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 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.

I`m happy to follow up with any required changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant