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 -6Showing whitespace changes
.github/workflows/pr-run-eslint.yml+27 -6
@@ -1,17 +1,38 @@
1name: ✅ Check ESLint on PR1name: ✅ Check ESLint on PR
22
3on: pull_request3on:
4 pull_request: # TODO: change to pull_request_target for 'staging'
5 types: [opened, synchronize]
6
7permissions:
8 contents: read
9 pull-requests: write
410
5jobs:11jobs:
6 eslint:12 run-eslint:
13 name: ✅ Check ESLint on PR
7 runs-on: ubuntu-latest14 runs-on: ubuntu-latest
15
8 steps:16 steps:
9 - uses: actions/checkout@v417 - name: Checkout Repository
10 - uses: actions/setup-node@v418 # 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: 2027 node-version: 20
13 - run: npm ci28
14 - uses: sibiraj-s/action-eslint@v329 - 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'