Skip to content

Commit 2299428

Browse files
authored
Update ESLint workflow configuration
1 parent da440a6 commit 2299428

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/eslint.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: ESLint
2+
3+
on:
4+
push:
5+
branches: [ "main", "DSSRF_Branch_Rule" ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ "main" ]
9+
schedule:
10+
- cron: '* * * * *'
11+
12+
jobs:
13+
eslint:
14+
name: Run eslint scanning
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
security-events: write
19+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
23+
24+
- name: Install ESLint
25+
run: |
26+
npm install [email protected]
27+
npm install @microsoft/[email protected]
28+
29+
- name: Run ESLint
30+
env:
31+
SARIF_ESLINT_IGNORE_SUPPRESSED: "true"
32+
run: npx eslint .
33+
--config .eslintrc.js
34+
--ext .js,.jsx,.ts,.tsx
35+
--format @microsoft/eslint-formatter-sarif
36+
--output-file eslint-results.sarif
37+
continue-on-error: true
38+
39+
- name: Upload analysis results to GitHub
40+
uses: github/codeql-action/upload-sarif@7434149006143a4d75b82a2f411ef15b03ccc2d7
41+
with:
42+
sarif_file: eslint-results.sarif
43+
wait-for-processing: true

0 commit comments

Comments
 (0)