repos:
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.11.11
    hooks:
      - id: ruff # linter
        args: [--fix, --exit-non-zero-on-fix] # sort imports and fix
      - id: ruff-format # formatter
  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: "v3.1.0"
    hooks:
      - id: prettier
        additional_dependencies:
          - prettier@3.5.0
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: trailing-whitespace
        args: [--markdown-linebreak-ext=md]
        exclude: |
          (?x)^(
              .*\.snap$|
              nf_core/pipeline-template/subworkflows/.*|
              nf_core/pipeline-template/modules/.*|
              tests/pipelines/__snapshots__/.*
          )$
      - id: end-of-file-fixer
        exclude: |
          (?x)^(
              .*\.snap$|
              nf_core/pipeline-template/subworkflows/.*|
              nf_core/pipeline-template/modules/.*|
              tests/pipelines/__snapshots__/.*
          )$
  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: "v1.15.0"
    hooks:
      - id: mypy
        additional_dependencies:
          - types-PyYAML
          - types-requests
          - types-jsonschema
          - types-Markdown
          - types-setuptools
          - pydantic
