lefthook
lefthook copied to clipboard
Fast and powerful Git hooks manager for any type of projects.
`lefthook.yml`: ```yml pre-commit: parallel: true commands: typecheck: run: 'npx tsc -p .' react-templates: glob: '*.{jsx,tsx}' run: > npx eslint {staged_files} --fix && npx prettier {staged_files} --write && git add {staged_files}...
Files array is computed by running a `files` command from working directory. But `run` is run from `filepath.Join(r.repo.RootPath, command.Root)`. This makes a weird looking configuration in case of using custom...
Fixes #178 Probably fixes also #99 The same workaround used in Husky https://typicode.github.io/husky/#/?id=command-not-found
Hey, I like to do contributions in this repo, It helped me to practice a lot about Go with it. Thanks! So, I made this feature, it should work on...
Create a JSON schema and add it to https://github.com/SchemaStore/schemastore so there will be support for validating / auto-completing configuration options within code editors. For example, the [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) VS Code extension...
Thank you for the effort you have put into lefthook and for making it opensource. It would be useful to be able to share hooks. since [Pre-Commit](https://pre-commit.com/) already does this,...
Hi! I was wondering if there's a way of running scripts with a "package agnostic" approach, so I can write something like this: ```yaml pre-push: commands: lint: run: lint #or...
Version 0.7.3 has changed how the output is produced to the console. In the result i.e. when running `rspec` with progress bar you won't see it and only spinner from...
I have this in my `lefthook.yml`: ``` pre-commit: commands: prettier: run: npx prettier -w {staged_files} ``` Then I edit my `.js` file and stage it: ``` git add . ```...