Skip to content

Add pre-commit hook#150

Open
huuff wants to merge 2 commits intobram209:mainfrom
huuff:pre-commit
Open

Add pre-commit hook#150
huuff wants to merge 2 commits intobram209:mainfrom
huuff:pre-commit

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