Skip to content

Commit 2620ef1

Browse files
authored
Merge pull request #640 from sir-gon/develop
Revert "[CONFIG] [Github Actions] uninstall previous ESLlint from cod…
2 parents a9dcfe3 + 91e222a commit 2620ef1

File tree

2 files changed

+136
-0
lines changed

2 files changed

+136
-0
lines changed
+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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+
schedule:
23+
# ┌───────────── minute (0 - 59)
24+
# │ ┌───────────── hour (0 - 23)
25+
# │ │ ┌───────────── day of the month (1 - 31)
26+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
27+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
28+
# │ │ │ │ │
29+
# │ │ │ │ │
30+
# │ │ │ │ │
31+
# * * * * *
32+
- cron: '23 15 * * 2'
33+
34+
jobs:
35+
eslint:
36+
name: Run eslint scanning
37+
runs-on: ubuntu-24.04
38+
permissions:
39+
contents: read
40+
security-events: write
41+
# only required for a private repository by
42+
# github/codeql-action/upload-sarif to get the Action run status
43+
actions: read
44+
steps:
45+
- name: Checkout code
46+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
47+
48+
- name: Set up Node.js
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: 22.x
52+
53+
- name: Install ESLint
54+
run: |
55+
npm install --include=dev [email protected]
56+
npm install --include=dev @microsoft/[email protected]
57+
58+
- name: Test ESLint
59+
run: |
60+
npx --yes eslint --env-info
61+
62+
- name: Run ESLint
63+
run: >
64+
npx eslint .
65+
--color
66+
--max-warnings=0
67+
--format @microsoft/eslint-formatter-sarif
68+
--output-file eslint-results.sarif
69+
continue-on-error: true
70+
71+
- name: Upload analysis results to GitHub
72+
uses: github/codeql-action/upload-sarif@v3
73+
with:
74+
sarif_file: eslint-results.sarif
75+
wait-for-processing: true

.github/workflows/eslint.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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
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: ${{ matrix.os }}
27+
strategy:
28+
matrix:
29+
os: ["ubuntu-24.04", "macos-14", "windows-2022"]
30+
node-version: [18.x, 20.x, 22.x]
31+
# See supported Node.js release schedule
32+
# at https://nodejs.org/en/about/releases/
33+
permissions:
34+
contents: read
35+
security-events: write
36+
# only required for a private repository by
37+
# github/codeql-action/upload-sarif to get the Action run status
38+
actions: read
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
42+
43+
- name: Set up Node.js
44+
uses: actions/setup-node@v4
45+
with:
46+
node-version: 22.x
47+
48+
- name: Install ESLint
49+
run: |
50+
npm install --include=dev [email protected]
51+
52+
- name: Test ESLint
53+
run: |
54+
npx --yes eslint --env-info
55+
56+
- name: Run ESLint
57+
run: >
58+
npx eslint .
59+
--color
60+
--max-warnings=0
61+
&& echo '✔ Your code looks good.'

0 commit comments

Comments
 (0)