-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.31 KB
/
lint.yaml
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
47
48
49
50
51
52
53
54
55
56
57
58
name: Lint
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
prettier:
name: Lint frontend with prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run prettier
working-directory: src/frontend
run: |
npx prettier --check .
eslint:
name: Lint frontend with eslint
runs-on: ubuntu-latest
permissions:
security-events: write
pull-requests: write
checks: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v2.4.1
with:
package_json_file: src/frontend/package.json
- name: Set up node
uses: actions/setup-node@v4
with:
node-version-file: src/frontend/package.json
cache-dependency-path: src/frontend/pnpm-lock.yaml
cache: pnpm
- name: Install dependencies
working-directory: src/frontend
run: |
pnpm install --frozen-lockfile
- name: Run eslint
working-directory: src/frontend
run: |
pnpm lint --format json --output-file result.json
- name: Upload eslint results
if: always()
uses: ldiego73/eslint-report-action@v1.1
with:
report: src/frontend/result.json