File tree Expand file tree Collapse file tree 2 files changed +39
-35
lines changed Expand file tree Collapse file tree 2 files changed +39
-35
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : PR Lint Check
2
+
3
+ on :
4
+ pull_request :
5
+ branches : [ master ]
6
+
7
+ jobs :
8
+ eslint-changed :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v4
12
+ with :
13
+ fetch-depth : 0
14
+
15
+ - name : Setup Node.js
16
+ uses : actions/setup-node@v4
17
+ with :
18
+ node-version : ' 20'
19
+
20
+ - name : Install dependencies
21
+ run : npm install
22
+
23
+ - name : Get changed files
24
+ id : changed-files
25
+ uses : tj-actions/changed-files@v44
26
+ with :
27
+ since_last_remote_commit : ' true'
28
+
29
+ - name : Filter JavaScript files
30
+ id : filter-js
31
+ run : |
32
+ changed_js_files=$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | grep -E '\.(js|ts|jsx|tsx)$' || true)
33
+ echo "changed_js_files=${changed_js_files}" >> $GITHUB_OUTPUT
34
+
35
+ - name : Run ESLint on changed JS files
36
+ if : ${{ steps.filter-js.outputs.changed_js_files != '' }}
37
+ run : |
38
+ echo "Changed JS files: ${{ steps.filter-js.outputs.changed_js_files }}"
39
+ npx eslint ${{ steps.filter-js.outputs.changed_js_files }}
You can’t perform that action at this time.
0 commit comments