Skip to content

Commit 6627018

Browse files
authored
Merge pull request #637 from sir-gon/develop
[CONFIG] [Github Actions] ESLint splitted.
2 parents ae1e1bd + 819cd7c commit 6627018

File tree

2 files changed

+76
-21
lines changed

2 files changed

+76
-21
lines changed
Lines changed: 75 additions & 0 deletions
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

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,6 @@ on: # yamllint disable-line rule:truthy
1919
# The branches below must be a subset of the branches above
2020
branches: ["main"]
2121
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'
3322

3423
jobs:
3524
eslint:
@@ -59,7 +48,6 @@ jobs:
5948
- name: Install ESLint
6049
run: |
6150
npm install --include=dev [email protected]
62-
npm install --include=dev @microsoft/[email protected]
6351
6452
- name: Test ESLint
6553
run: |
@@ -70,12 +58,4 @@ jobs:
7058
npx eslint .
7159
--color
7260
--max-warnings=0
73-
--format @microsoft/eslint-formatter-sarif
74-
--output-file eslint-results.sarif
75-
continue-on-error: true
76-
77-
- name: Upload analysis results to GitHub
78-
uses: github/codeql-action/upload-sarif@v3
79-
with:
80-
sarif_file: eslint-results.sarif
81-
wait-for-processing: true
61+
&& echo '✔ Your code looks good.'

0 commit comments

Comments
 (0)