Hooks to apply to projects that use pre-commit.
Make sure to have pre-commit installed (pip install pre-commit
).
Add the following to your .pre-commit-config.yaml
:
repos:
- repo: https://github.com/thibmaek/pre-commit
rev: '' # point to tag or commit
hooks:
- id: disallow-yml
- id: shellcheck
- id: typescript
- ...
If you don't want to point to a tag and look it up just copy the config and run pre-commit autoupdate
.
These hooks are currently available:
Hook ID | Description | Notes |
---|---|---|
disallow-yaml |
Disallows the usage of the .yml file extension in favour of .yaml | |
shellcheck |
Runs shellcheck to lint shell scripts | |
shfmt |
Runs shfmt to format shell scripts | |
typescript |
Compiles individual files with the Typescript Compiler (tsc ) |
This will create a temporary tsconfig.json with only the files passed by pre-commit in the include directive. The file is automatically deleted afterwards. |
MIT
For more info, see license file