| 1 | name: ✅ Check ESLint on PR | 1 | name: ✅ Check ESLint on PR |
| 2 | | 2 | |
| 3 | on: pull_request | 3 | on: |
| | 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 | jobs: | 11 | jobs: |
| 6 | eslint: | 12 | run-eslint: |
| | 13 | name: ✅ Check ESLint on PR |
| 7 | runs-on: ubuntu-latest | 14 | runs-on: ubuntu-latest |
| | 15 | |
| 8 | steps: | 16 | steps: |
| 9 | - uses: actions/checkout@v4 | 17 | - name: Checkout 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 | with: | 26 | with: |
| 12 | node-version: 20 | 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 | with: | 36 | with: |
| 16 | token: ${{ secrets.GITHUB_TOKEN }} | 37 | token: ${{ secrets.GITHUB_TOKEN }} |
| 17 | eslint-args: '--ignore-path=.gitignore --quiet' | 38 | eslint-args: '--ignore-path=.gitignore --quiet' |