Add additional pre-commit hooks (#245)

* Add and run end-of-file-fixer
* Add and run trailing-whitespace
* Add and run check-yaml
* Add and run check-json
* Add and run pretty-format-yaml
* Fix comment indentation
This commit is contained in:
Matt Kramer
2022-05-06 14:27:11 -05:00
committed by GitHub
parent 3347532f5e
commit cc6d6247a8
30 changed files with 172 additions and 158 deletions

View File

@@ -1,12 +1,29 @@
# This is the configuration for pre-commit, a local framework for managing pre-commit hooks
# Check out the docs at: https://pre-commit.com/
default_stages: [commit]
repos:
- repo: https://github.com/psf/black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: end-of-file-fixer
exclude: \.min\.js$
- id: trailing-whitespace
- id: check-json
exclude: tsconfig.json
- id: check-yaml
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.3.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '4']
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
- id: isort
name: isort (python)
args: [--profile, black]