# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

ci:
  autofix_commit_msg: "chore(fmt): apply pre-commit formatting fixes"
  autoupdate_commit_msg: "chore(deps): autoupdate pre-commit"

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: check-added-large-files
      - id: check-case-conflict
      - id: check-executables-have-shebangs
      - id: check-illegal-windows-names
      - id: check-json
      - id: check-shebang-scripts-are-executable
      - id: check-symlinks
      - id: check-toml
      - id: check-yaml
        args: [ --allow-multiple-documents ]
      - id: destroyed-symlinks
      - id: end-of-file-fixer
      - id: mixed-line-ending
        args: [ --fix=lf ]
      - id: trailing-whitespace

  - repo: https://github.com/Lucas-C/pre-commit-hooks
    rev: v1.5.6
    hooks:
      - id: forbid-tabs
      - id: remove-tabs

  - repo: local
    hooks:
      - id: oxfmt
        name: oxfmt
        description: 'Formatter for the JavaScript Oxidation Compiler'
        entry: oxfmt
        language: node
        'types_or': [ javascript, jsx, ts, tsx ]
        args: [ ]
        require_serial: false
        additional_dependencies: [ "oxfmt@0.15.0" ]
        minimum_pre_commit_version: '2.9.2'
