repos:
  # Rust formatting
  - repo: local
    hooks:
      - id: rustfmt
        name: rustfmt
        entry: cargo fmt --all
        language: system
        pass_filenames: false

      - id: clippy
        name: clippy
        entry: cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
        language: system
        pass_filenames: false

      - id: cargo-check
        name: cargo check
        entry: cargo check
        language: system
        pass_filenames: false

  # Biome formatting
  - repo: local
    hooks:
      - id: biome
        name: biome
        entry: biome format --write
        language: system
        files: \.(js|ts|jsx|tsx|json|css)$

  # Prettier formatting for markdown
  # Waiting on https://github.com/biomejs/biome/issues/3718
  - repo: local
    hooks:
      - id: prettier
        name: prettier
        entry: prettier --write
        language: system
        files: \.md$
