name: ESLint
on: pull_request

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
            node-version: '18'
            cache: 'yarn'
      # Disable eslint annotations, which are already appended by the build action
      - run: |
            echo "::remove-matcher owner=eslint-compact::"
            echo "::remove-matcher owner=eslint-stylish::"
      - name: Install dependencies
        run: yarn
      # TODO: Replace this with a github action that parses the output of eslint
      # and annotates the files: this step doesn't have all annotations working
      # Or, wait for github to fix it.
      - name: Lint
        run: yarn lint:fail-on-warnings
