-
Notifications
You must be signed in to change notification settings - Fork 87
42 lines (38 loc) · 1.11 KB
/
lint.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
name: Lint
on:
pull_request:
branches:
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- run: npm ci
- name: Prettify code
uses: creyD/[email protected]
with:
prettier_options: --write .
only_changed: true
commit_message: 'chore: format with prettier'
clean_node_folder: false
- name: Lint
# github adds inline annotation for compact or stylish format
# which is different than our default for local usage
run: npm run lint:node -- --format=compact
- name: Types
run: npm run typecheck:node
# we still want to check types if lint fails just to know everything
# and not peel errors to uncover new ones of different type
if: always()