Created
April 1, 2022 17:04
-
-
Save bskiefer/49ba4ee28620877e0d6fbacc7fb550f0 to your computer and use it in GitHub Desktop.
pre-commit hooks & config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repos: | |
- hooks: | |
- id: trailing-whitespace | |
- id: check-docstring-first | |
- id: check-json | |
- id: pretty-format-json | |
- id: check-merge-conflict | |
- id: check-yaml | |
- id: debug-statements | |
- id: name-tests-test | |
- id: requirements-txt-fixer | |
- id: double-quote-string-fixer | |
repo: "https://github.com/pre-commit/pre-commit-hooks" | |
rev: v4.1.0 | |
- hooks: | |
- id: add-trailing-comma | |
repo: "https://github.com/asottile/add-trailing-comma" | |
rev: v2.2.2 | |
- hooks: | |
- id: php-stan | |
files: \.(php)$ | |
repo: "https://github.com/digitalpulp/pre-commit-php" | |
rev: 1.4.0 | |
- hooks: | |
- id: check-hooks-apply | |
- id: check-useless-excludes | |
repo: meta | |
- hooks: | |
- id: php-lint | |
- id: composer-normalize-fix | |
- id: composer-validate | |
- id: blade-formatter | |
args: [--write] | |
- id: php-cs | |
files: \.(php)$ | |
args: [--standard=PSR2 -e -p -n] | |
- id: php-cbf | |
name: PSR-2 | |
files: \.(php)$ | |
args: [--standard=PSR2 -e -p -n] | |
- id: php-cbf | |
name: PSR-12 | |
files: \.(php)$ | |
args: [--standard=PSR12 -e -p -n] | |
repo: "[email protected]:bskiefer/pre-commit-php.git" | |
rev: '1.6' | |
- hooks: | |
- id: dockerfilelint | |
stages: | |
- commit | |
repo: "https://github.com/pryorda/dockerfilelint-precommit-hooks" | |
rev: v0.1.0 | |
- hooks: | |
- additional_dependencies: | |
- [email protected] | |
- [email protected] | |
- [email protected] | |
- [email protected] | |
- [email protected] | |
- [email protected] | |
- [email protected] | |
- [email protected] | |
- [email protected] | |
- [email protected] | |
- [email protected] | |
- [email protected] | |
- [email protected] | |
- [email protected] | |
- eslint-plugin-html@latest | |
args: | |
- "--ignore-path=~/.js/.eslintignore" | |
- "--config=~/.js/.eslintrc.js" | |
id: eslint | |
files: \.[jt]sx?$ | |
verbose: false | |
types: [file] | |
repo: "https://github.com/pre-commit/mirrors-eslint" | |
rev: v8.12.0 | |
- repo: https://github.com/hadolint/hadolint | |
rev: v2.10.0 | |
hooks: | |
- id: hadolint | |
- repo: https://github.com/hadolint/hadolint | |
rev: v2.10.0 | |
hooks: | |
- id: hadolint-docker | |
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | |
rev: v2.3.0 | |
hooks: | |
- id: pretty-format-golang | |
args: [--autofix] | |
- repo: https://github.com/PeterMosmans/jenkinslint | |
rev: master | |
hooks: | |
- id: jenkinslint | |
args: [https://...jenkins_url.../] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run pre-commit hooks | |
alias pcr="pre-commit run --config ~/.pre-commit-config.yaml" | |
# Install pre-commit hooks for project | |
alias pci="pre-commit install --config ~/.pre-commit-config.yaml --install-hooks" | |
# Update dependencies | |
alias pcu="pre-commit autoupdate --config ~/.pre-commit-config.yaml" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment