repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.3.0
    hooks:
      - id: flake8
        stages:
          - commit
  - repo: local
    hooks:
      - id: typescript
        name: TypeScript
        files: 'hyperglass/ui/*'
        exclude: 'hyperglass/ui/node_modules|hyperglass/ui/.next'
        stages:
          - commit
        entry: ./.tests/pre-commit-frontend.sh --typescript
        language: script
  - repo: local
    hooks:
      - id: eslint
        name: ESLint
        files: 'hyperglass/ui/*'
        exclude: 'hyperglass/ui/node_modules|hyperglass/ui/.next'
        stages:
          - commit
        entry: ./.tests/pre-commit-frontend.sh --eslint
        language: script
  - repo: local
    hooks:
      - id: prettier
        name: Prettier
        files: 'hyperglass/ui/*'
        exclude: 'hyperglass/ui/node_modules|hyperglass/ui/.next'
        stages:
          - commit
        entry: ./.tests/pre-commit-frontend.sh --prettier
        language: script
