diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..f9f6aba --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,24 @@ +repos: + # Prevent commits to the main branch. + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-json + - id: check-merge-conflict + - id: check-toml + - id: check-yaml + - id: end-of-file-fixer + - id: mixed-line-ending + args: + - --fix=lf + - id: name-tests-test + args: + - --pytest-test-first + - id: no-commit-to-branch + name: ensure we are not committing to branch `main` + args: + - --branch=main + - id: pretty-format-json + args: + - --autofix + - id: trailing-whitespace