diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1424240..2361b60 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -29,7 +29,7 @@ "njpwerner.autodocstring", ], - "postCreateCommand": "poetry install --no-root", + "postCreateCommand": "poetry install --no-root && poetry run pre-commit install", "remoteUser": "vscode", } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..25f5732 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,46 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: + - id: check-added-large-files + - id: check-merge-conflict + - id: check-toml + - id: check-yaml + - id: detect-private-key + - id: end-of-file-fixer + - id: forbid-new-submodules + - id: trailing-whitespace + - repo: https://github.com/igorshubovych/markdownlint-cli + rev: v0.30.0 + hooks: + - id: markdownlint + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v13.0.0 + hooks: + - id: clang-format + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v2.4.1 + hooks: + - id: prettier + args: + - --config-precedence=file-override + additional_dependencies: + - prettier@2.4.1 + - prettier-plugin-toml@0.3.1 + - repo: https://github.com/pryorda/dockerfilelint-precommit-hooks + rev: v0.1.0 + hooks: + - id: dockerfilelint + - repo: https://github.com/psf/black + rev: 21.11b1 + hooks: + - id: black + language_version: python3.9 + - repo: https://github.com/PyCQA/flake8 + rev: 4.0.1 + hooks: + - id: flake8 + - repo: meta + hooks: + - id: check-hooks-apply + - id: check-useless-excludes