name: ESLint

permissions:
  contents: read

on:
    pull_request:
        paths:
            - '**/*.js'
            - '**/*.jsx'
            - '**/*.ts'
            - '**/*.tsx'
            - '.eslintrc*'
            - 'package.json'
            - 'yarn.lock'
            - 'pnpm-lock.yaml'
            - 'package-lock.json'

jobs:
    Linter:
        runs-on: ubuntu-latest
        steps:
            - name: Checkout code
              uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

            - name: Set up Node.js
              uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
              with:
                node-version: '24'

            - name: Install dependencies
              run: npm ci

            - name: Create build file
              run: npm run set:oss

            - name: Run ESLint
              run: npx eslint . --ext .js,.jsx,.ts,.tsx
