-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (35 loc) · 996 Bytes
/
linters.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
name: Linters
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
pull-requests: write
checks: write
jobs:
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-setup@v1
- name: Run prettier
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
run: |
./dev.sh npm ci
./dev.sh npm run format
reviewdog -f=diff -name=prettier -reporter=github-pr-check -fail-on-error=true
eslint:
name: Eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-setup@v1
- name: Run eslint
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
run: |
./dev.sh npm ci
./dev.sh npm run lint -- -f checkstyle -o eslint.xml || true
cat eslint.xml | reviewdog -f=checkstyle -name=eslint -reporter=github-pr-check -fail-on-error=true