digitalfabrik/integreat-cms

View on GitHub
.pre-commit-config.yaml

Summary

Maintainability
Test Coverage
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.6.0
    hooks:
      - id: check-added-large-files
      - id: check-merge-conflict
      - id: check-shebang-scripts-are-executable
      - id: check-symlinks
      - id: check-toml
      - id: check-vcs-permalinks
      - id: detect-private-key
      - id: end-of-file-fixer
      - id: mixed-line-ending
      - id: trailing-whitespace
        args: ["--markdown-linebreak-ext=md,markdown"]
        exclude: .github/PULL_REQUEST_TEMPLATE.md|tests/cms/views/dashboard/expected_output/chat.html
      - id: no-commit-to-branch
        args: [--branch, main, --branch, develop]
  - repo: local
    hooks:
      - id: ruff
        name: ruff (custom script)
        entry: ./tools/ruff.sh
        args: ["--as-precommit"]
        types_or: ["python", "pyi"]
        language: script
        pass_filenames: false
  - repo: https://github.com/shellcheck-py/shellcheck-py
    rev: v0.10.0.1
    hooks:
      - id: shellcheck
        args: [--external-sources]
  - repo: local
    hooks:
      - id: black
        name: black (custom script)
        entry: ./tools/black.sh
        args: ["--as-precommit"]
        types_or: ["python", "pyi"]
        language: script
        pass_filenames: true
  - repo: local
    hooks:
      - id: djlint-django
        name: djlint (custom script)
        entry: ./tools/djlint.sh
        args: ["--as-precommit"]
        types_or: ["html"]
        language: script
        pass_filenames: true
  - repo: local
    hooks:
      - id: eslint
        name: eslint (custom script)
        entry: ./tools/eslint.sh
        args: ["--as-precommit"]
        types_or: ["javascript", "jsx", "ts", "tsx"]
        language: script
        pass_filenames: true
  - repo: local
    hooks:
      - id: prettier
        name: prettier (custom script)
        entry: ./tools/prettier.sh
        args: ["--as-precommit"]
        types_or: ["javascript", "jsx", "ts", "tsx", "css", "sass", "scss", "yaml", "markdown", "json"]
        language: script
        pass_filenames: true
  - repo: local
    hooks:
      - id: translations
        name: translations
        description: Check if the translation file is up-to-date
        entry: tools/check_translations.sh
        types_or: [python, html]
        language: script
        pass_filenames: true
  - repo: local
    hooks:
      - id: frontend-tests
        name: frontend-tests
        description: Run frontend tests
        entry: tools/vitest.sh
        language: script
        pass_filenames: false
  - repo: local
    hooks:
      - id: mypy
        name: mypy (custom script)
        entry: ./tools/mypy.sh
        args: ["--as-precommit"]
        types_or: ["python", "pyi"]
        language: script
        pass_filenames: true
  - repo: local
    hooks:
      - id: pylint
        name: pylint (custom script)
        entry: ./tools/pylint.sh
        args: ["--as-precommit"]
        types_or: ["python", "pyi"]
        language: script
        pass_filenames: true