Move run-eslint to PR Manager workflow
| @@ -11,6 +11,41 @@ permissions: | ||
| 11 | 11 | pull-requests: write |
| 12 | 12 | |
| 13 | 13 | jobs: |
| 14 | + run-eslint: | |
| 15 | + name: ✅ Check ESLint on PR | |
| 16 | + runs-on: ubuntu-latest | |
| 17 | + # Only needs to run when code is changed | |
| 18 | + if: github.event.action == 'opened' || github.event.action == 'synchronize' | |
| 19 | + | |
| 20 | + steps: | |
| 21 | + - name: Checkout Repository | |
| 22 | + # Checkout | |
| 23 | + # https://github.com/marketplace/actions/checkout | |
| 24 | + uses: actions/checkout@v4.2.2 | |
| 25 | + | |
| 26 | + - name: Setup Node.js | |
| 27 | + # Setup Node.js environment | |
| 28 | + # https://github.com/marketplace/actions/setup-node-js-environment | |
| 29 | + uses: actions/setup-node@v4.3.0 | |
| 30 | + with: | |
| 31 | + node-version: 20 | |
| 32 | + | |
| 33 | + - name: Run npm install | |
| 34 | + run: npm ci | |
| 35 | + | |
| 36 | + - name: Run ESLint | |
| 37 | + # Action ESLint | |
| 38 | + # https://github.com/marketplace/actions/action-eslint | |
| 39 | + uses: sibiraj-s/action-eslint@v3.0.1 | |
| 40 | + with: | |
| 41 | + token: ${{ secrets.GITHUB_TOKEN }} | |
| 42 | + eslint-args: '--ignore-path=.gitignore --quiet' | |
| 43 | + extensions: 'js,ts' | |
| 44 | + annotations: true | |
| 45 | + ignore-patterns: | | |
| 46 | + dist/ | |
| 47 | + lib/ | |
| 48 | + | |
| 14 | 49 | label-by-size: |
| 15 | 50 | name: 🏷️ Label PR by Size |
| 16 | 51 | # This job should run after all others, to prevent possible concurrency issues |
| @@ -1,43 +0,0 @@ | ||
| 1 | -name: ✅ Check ESLint on PR | |
| 2 | - | |
| 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 | |
| 10 | - | |
| 11 | -jobs: | |
| 12 | - run-eslint: | |
| 13 | - name: ✅ Check ESLint on PR | |
| 14 | - runs-on: ubuntu-latest | |
| 15 | - | |
| 16 | - steps: | |
| 17 | - - name: Checkout Repository | |
| 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 | |
| 26 | - with: | |
| 27 | - node-version: 20 | |
| 28 | - | |
| 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 | |
| 36 | - with: | |
| 37 | - token: ${{ secrets.GITHUB_TOKEN }} | |
| 38 | - eslint-args: '--ignore-path=.gitignore --quiet' | |
| 39 | - extensions: 'js,ts' | |
| 40 | - annotations: true | |
| 41 | - ignore-patterns: | | |
| 42 | - dist/ | |
| 43 | - lib/ | |