| 1 | 1 | name: ✅ Check ESLint on PR |
| 2 | 2 | |
| 3 | 3 | on: pull_request |
| 4 | + pull_request: # TODO: change to pull_request_target for 'staging' |
| 5 | + types: [opened, synchronize] |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: read |
| 9 | + pull-requests: write |
| 4 | 10 | |
| 5 | 11 | jobs: |
| 6 | 12 | run-eslint: |
| 13 | + name: ✅ Check ESLint on PR |
| 7 | 14 | runs-on: ubuntu-latest |
| 15 | + |
| 8 | 16 | steps: |
| 9 | 17 | - usesname: actions/checkout@v4Checkout Repository |
| 10 | | - - uses: actions/setup-node@v4 |
| 18 | + # Checkout |
| 19 | + # https://github.com/marketplace/actions/checkout |
| 20 | + uses: actions/checkout@v4.2.2 |
| 21 | + |
| 22 | + - name: Setup Node.js |
| 23 | + # Setup Node.js environment |
| 24 | + # https://github.com/marketplace/actions/setup-node-js-environment |
| 25 | + uses: actions/setup-node@v4.3.0 |
| 11 | 26 | with: |
| 12 | 27 | node-version: 20 |
| 13 | | - - run: npm ci |
| 28 | + |
| 14 | | - - uses: sibiraj-s/action-eslint@v3 |
| 29 | + - name: Run npm install |
| 30 | + run: npm ci |
| 31 | + |
| 32 | + - name: Run ESLint |
| 33 | + # Action ESLint |
| 34 | + # https://github.com/marketplace/actions/action-eslint |
| 35 | + uses: sibiraj-s/action-eslint@v3.0.1 |
| 15 | 36 | with: |
| 16 | 37 | token: ${{ secrets.GITHUB_TOKEN }} |
| 17 | 38 | eslint-args: '--ignore-path=.gitignore --quiet' |