repos:
  - repo: local
    hooks:
      - id: autoflake
        name: autoflake
        entry: autoflake
        language: system
        "types": [python]
        require_serial: true
        files: &files ^(sqlmesh/|tests/|web/|examples/|setup.py)
      - id: isort
        name: isort
        entry: isort
        language: system
        "types": [python]
        files: *files
        require_serial: true
      - id: black
        name: black
        language: system
        args:
          - --target-version
          - py37
          - --line-length
          - "100"
        entry: black
        require_serial: true
        files: *files
        types_or:
          - python
          - pyi
      - id: mypy
        name: mypy
        language: system
        entry: mypy
        "types": [python]
        files: *files
        require_serial: true
  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: "6f3cb13"
    hooks:
      - id: prettier
        name: prettier
        files: ^(web/client)
        entry: prettier --write --ignore-path web/client/.prettierignore
        exclude: ^(web/client/node_modules)
        require_serial: true
        language: node
  - repo: https://github.com/pre-commit/mirrors-eslint
    rev: "9636d51"
    hooks:
      - id: eslint
        name: eslint
        files: ^(web/client)
        exclude: ^(web/client/node_modules)
        entry: eslint --fix
        additional_dependencies:
          [
            "@typescript-eslint/eslint-plugin",
            "@typescript-eslint/parser",
            eslint@8.36.0,
            eslint-config-prettier@8.7.0,
            eslint-config-standard-with-typescript@34.0.1,
            eslint-plugin-import@2.27.4,
            eslint-plugin-n@15.6.1,
            eslint-plugin-promise@6.1.1,
            eslint-plugin-react@7.32.2,
          ]
        require_serial: true
        language: node
