-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.01 KB
/
format-and-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
name: format-and-lint
on:
push:
branches: [main]
pull_request_target:
permissions: read-all
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- if: ${{ github.event_name != 'pull_request_target' }}
uses: actions/checkout@v3
- if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Run Prettier
run: pnpm run format:check
eslint:
runs-on: ubuntu-latest
steps:
- if: ${{ github.event_name != 'pull_request_target' }}
uses: actions/checkout@v3
- if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup turbo
uses: ./.github/actions/setup-turbo
with:
turbo-cache-key: lint
- name: Run ESLint
run: pnpm run lint