name: Linters
on:
  pull_request:
  push:
    branches:
      - main
      
jobs:
  check_code:
    name: Run code checks
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-node@v3
      with:
        node-version: 18
        cache: 'yarn'
    - name: Install dependencies
      run: yarn install --frozen-lockfile
    - name: Run ESLint
      run: yarn lint:eslint
    - name: Compile TypeScript
      run: yarn lint:tsc