# Install pre-commit hooks via
# pre-commit install

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
    hooks:
      - id: check-added-large-files
      - id: check-ast
      - id: check-builtin-literals
      - id: check-case-conflict
      - id: check-json
      - id: check-toml
      - id: check-yaml
        args: [--allow-multiple-documents]
      - id: debug-statements
      - id: end-of-file-fixer
      - id: mixed-line-ending
      - id: trailing-whitespace

  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: ffb6a759a979008c0e6dff86e39f4745a2d9eac4 # frozen: v3.1.0
    hooks:
      - id: prettier
        files: \.(css|html|md|yml|yaml|toml)
        args: [--prose-wrap=preserve]

  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: 1dc9eb131c2ea4816c708e4d85820d2cc8542683 # frozen: v0.5.0
    hooks:
      - id: ruff
        args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"]
      - id: ruff-format

  - repo: https://github.com/adamchainz/blacken-docs
    rev: 4c97c4a0d921007af6fefae92d8447cfbf63720b # frozen: 1.18.0
    hooks:
      - id: blacken-docs

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: 6f546f30c2b142ad5b3edcf20e3d27cf1789b932 # frozen: v1.10.1
    hooks:
      - id: mypy

  - repo: https://github.com/codespell-project/codespell
    rev: "193cd7d27cd571f79358af09a8fb8997e54f8fff" # frozen: v2.3.0
    hooks:
      - id: codespell
        args: ["-L", "ans"]
