Update eslint workflows version + formatting - Add explicit version numbers (to prevent update conflicts) - Separate the steps and give them names, for better readability on workflow log - Only run on opened/synchronize

39a385ab0491b4cf326028c9f8640d29cba985c5

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +27 -6Ignore whitespace
.github/workflows/pr-run-eslint.yml+27 -6
@@ -1,17 +1,38 @@
11name: ✅ Check ESLint on PR
22
33on: 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
410
511jobs:
612 run-eslint:
13+ name: ✅ Check ESLint on PR
714 runs-on: ubuntu-latest
15+
816 steps:
917 - 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
1126 with:
1227 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
1536 with:
1637 token: ${{ secrets.GITHUB_TOKEN }}
1738 eslint-args: '--ignore-path=.gitignore --quiet'