-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (43 loc) · 1.16 KB
/
js.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: JS
on:
workflow_dispatch:
pull_request:
paths:
- '**/*.js'
- '**/*.ts'
- package.json
- package-lock.json
- .github/actions/setup-node/action.yml
- .github/workflows/js.yml
push:
paths:
- '**/*.js'
- '**/*.ts'
- package.json
- package-lock.json
- .github/actions/setup-node/action.yml
- .github/workflows/js.yml
branches:
- trunk
jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
- name: Run ESLint
run: npm run eslint -- --output-file eslint-report.json --format json
continue-on-error: true
- name: ESLint report to cli
run: node -p "require('./node_modules/eslint/lib/cli-engine/formatters/stylish.js')(require('./eslint-report.json'))"
- name: Annotate ESLint report
uses: ataylorme/eslint-annotate-action@v3
with:
report-json: eslint-report.json
type-checking:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
- name: Run ESLint
run: npm run tsc