name: Lint Check

on:
  pull_request:
    branches: ['*']
  push:
    branches: ['main']

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
  FORCE_COLOR: 3

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup
        uses: ./.github/setup

      - name: 🔬 Lint
        run: npm run lint

      - name: 💅 Prettier check
        run: npm run format:check
