repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.1.0
    hooks:
      - id: check-case-conflict
      - id: end-of-file-fixer
        # python, js and ts only
        files: \.(py|js|ts)$
      - id: mixed-line-ending
        files: \.(py|js|ts)$
        args:
          - --fix=lf
      - id: trailing-whitespace
  - repo: local
    hooks:
      - id: ruff-check
        name: ruff check
        language: system
        entry: bash -c "uv run ruff check"
        types: [file, python]
      - id: ruff-format
        name: ruff format
        language: system
        entry: bash -c "uv run ruff format"
        types: [file, python]