name: Lint

on:
  push:
    branches: [main, master, next]
  pull_request:

permissions:
  checks: write
  contents: write

jobs:
  run-linters:
    name: Run linters
    runs-on: ubuntu-latest

    steps:
      - name: Check out repo
        uses: actions/checkout@v5

      - name: Set up node
        uses: actions/setup-node@v5
        with:
          node-version: 20
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Run linters
        run: npm run lint
