Skip to content

Commit 1767885

Browse files
author
Gonzalo Diaz
committed
Revert "[CONFIG] [Github Actions] uninstall previous ESLlint from code scanning tool."
This reverts commit 52e1fc0.
1 parent 52e1fc0 commit 1767885

File tree

2 files changed

+134
-0
lines changed

2 files changed

+134
-0
lines changed
Lines changed: 64 additions & 0 deletions
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

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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+
name: ESLint
12+
13+
on: # yamllint disable-line rule:truthy
14+
push:
15+
branches: ["main"]
16+
pull_request:
17+
# The branches below must be a subset of the branches above
18+
branches: ["main"]
19+
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'
31+
32+
jobs:
33+
eslint:
34+
name: Run eslint scanning
35+
runs-on: ${{ matrix.os }}
36+
strategy:
37+
matrix:
38+
os: ["ubuntu-24.04", "macos-14", "windows-2022"]
39+
node-version: [18.x, 20.x, 22.x]
40+
# See supported Node.js release schedule
41+
# at https://nodejs.org/en/about/releases/
42+
permissions:
43+
contents: read
44+
security-events: write
45+
# only required for a private repository by
46+
# github/codeql-action/upload-sarif to get the Action run status
47+
actions: read
48+
steps:
49+
- name: Checkout code
50+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
51+
52+
- name: Set up Node.js
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: 22.x
56+
57+
- name: Install ESLint
58+
run: |
59+
npm install --include=dev [email protected]
60+
61+
- name: Test ESLint
62+
run: |
63+
npx --yes eslint --env-info
64+
65+
- name: Run ESLint
66+
run: >
67+
npx eslint .
68+
--color
69+
--max-warnings=0
70+
&& echo '✔ Your code looks good.'

0 commit comments

Comments
 (0)