Skip to content

Commit 7af906a

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Github Actions] uninstall previous ESLlint from code scanning tool.
1 parent b5937bc commit 7af906a

File tree

2 files changed

+76
-21
lines changed

2 files changed

+76
-21
lines changed
+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# ESLint is a tool for identifying and reporting on patterns
6+
# found in ECMAScript/JavaScript code.
7+
# More details at https://github.com/eslint/eslint
8+
# and https://eslint.org
9+
10+
---
11+
12+
name: ESLint Code Scanning
13+
14+
15+
on: # yamllint disable-line rule:truthy
16+
push:
17+
branches: ["main"]
18+
pull_request:
19+
# The branches below must be a subset of the branches above
20+
branches: ["main"]
21+
workflow_dispatch:
22+
23+
jobs:
24+
eslint:
25+
name: Run eslint scanning
26+
runs-on: ubuntu-24.04
27+
permissions:
28+
contents: read
29+
security-events: write
30+
# only required for a private repository by
31+
# github/codeql-action/upload-sarif to get the Action run status
32+
actions: read
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
36+
37+
- name: Set up Node.js
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: 22.x
41+
42+
- name: Install ESLint
43+
run: |
44+
npm install --include=dev [email protected]
45+
npm install --include=dev @microsoft/[email protected]
46+
47+
- name: Test ESLint
48+
run: |
49+
npx --yes eslint --env-info
50+
51+
- name: Run ESLint
52+
run: >
53+
npx eslint .
54+
--color
55+
--max-warnings=0
56+
--format @microsoft/eslint-formatter-sarif
57+
--output-file eslint-results.sarif
58+
continue-on-error: true
59+
60+
- name: Upload analysis results to GitHub
61+
uses: github/codeql-action/upload-sarif@v3
62+
with:
63+
sarif_file: eslint-results.sarif
64+
wait-for-processing: true

.github/workflows/eslint.yml

+12-21
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ on: # yamllint disable-line rule:truthy
1717
# The branches below must be a subset of the branches above
1818
branches: ["main"]
1919
workflow_dispatch:
20-
schedule:
21-
# ┌───────────── minute (0 - 59)
22-
# │ ┌───────────── hour (0 - 23)
23-
# │ │ ┌───────────── day of the month (1 - 31)
24-
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
25-
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
26-
# │ │ │ │ │
27-
# │ │ │ │ │
28-
# │ │ │ │ │
29-
# * * * * *
30-
- cron: '36 13 * * 1'
20+
# schedule:
21+
# # ┌───────────── minute (0 - 59)
22+
# # │ ┌───────────── hour (0 - 23)
23+
# # │ │ ┌───────────── day of the month (1 - 31)
24+
# # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
25+
# # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
26+
# # │ │ │ │ │
27+
# # │ │ │ │ │
28+
# # │ │ │ │ │
29+
# # * * * * *
30+
# - cron: '36 13 * * 1'
3131

3232
jobs:
3333
eslint:
@@ -57,7 +57,6 @@ jobs:
5757
- name: Install ESLint
5858
run: |
5959
npm install --include=dev [email protected]
60-
npm install --include=dev @microsoft/[email protected]
6160
6261
- name: Test ESLint
6362
run: |
@@ -68,12 +67,4 @@ jobs:
6867
npx eslint .
6968
--color
7069
--max-warnings=0
71-
--format @microsoft/eslint-formatter-sarif
72-
--output-file eslint-results.sarif
73-
continue-on-error: true
74-
75-
- name: Upload analysis results to GitHub
76-
uses: github/codeql-action/upload-sarif@v3
77-
with:
78-
sarif_file: eslint-results.sarif
79-
wait-for-processing: true
70+
&& echo '✔ Your code looks good.'

0 commit comments

Comments
 (0)