exclude: |
  # NOT INSTALLABLE ADDONS
  # END NOT INSTALLABLE ADDONS
  # Files and folders generated by bots, to avoid loops
  ^setup/|/static/description/index\.html$|
  # We don't want to mess with tool-generated files
  .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|
  # Maybe reactivate this when all README files include prettier ignore tags?
  ^README\.md$|
  # Repos using Sphinx to generate docs don't need prettying
  ^docs/_templates/.*\.html$|
  # Don't bother non-technical authors with formatting issues in docs
  readme/.*\.(rst|md)$|
  # Ignore build and dist directories in addons
  /build/|/dist/|/dev/|/src/|/scrypt-1.2.1/|/util/|scrypt-windows-stubs/|
  # You don't usually want a bot to modify your legal texts
  (LICENSE.*|COPYING.*)|
default_language_version:
  python: python3
  node: "16.17.0"
repos:
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.6.8
    hooks:
      - id: ruff
        args: [--fix, --exit-non-zero-on-fix, --config=.ruff.toml]
      - id: ruff-format
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.6.0
    hooks:
      - id: check-toml
      - id: check-yaml
      - id: end-of-file-fixer
      - id: trailing-whitespace
      - id: check-symlinks
      - id: check-xml
      - id: mixed-line-ending
        args: ["--fix=lf"]
      - id: debug-statements
      - id: fix-encoding-pragma
        args: ["--remove"]
      - id: check-case-conflict
      - id: check-docstring-first
      - id: check-executables-have-shebangs
      - id: check-merge-conflict
        # exclude files where underlines are not distinguishable from merge conflicts
        exclude: /README\.rst$|^docs/.*\.rst$
  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: v2.7.1
    hooks:
      - id: prettier
        name: prettier (with plugin-xml)
        additional_dependencies:
          - "prettier@2.7.1"
          - "@prettier/plugin-xml@2.2.0"
        args:
          - --plugin=@prettier/plugin-xml
        files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
  - repo: https://github.com/pre-commit/mirrors-eslint
    rev: v8.24.0
    hooks:
      - id: eslint
        verbose: true
        args:
          - --color
          - --fix
