-
-
Notifications
You must be signed in to change notification settings - Fork 572
77 lines (61 loc) · 1.81 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Linting
on: [push, pull_request]
jobs:
ESLint:
name: ESLint
runs-on: ubuntu-latest
env:
CI: true # Should already be set to TRUE by Github?
TERM: xterm
FORCE_COLOR: 1
NODE_VERSION: 16.14 # Should be moved to repository env variable
NODE_OPTIONS: "--max-old-space-size=4096" # Give eslint more space?
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- run: yarn --immutable
- name: Compile eslint-plugin-graphile-export
run:
yarn workspaces foreach -ptR --from eslint-plugin-graphile-export run
prepack
- name: "Lint Code"
run: yarn eslint .
Prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- run: yarn --immutable
- name: "Check Code Format"
run: yarn prettier:check
depcheck:
name: Benjie's depcheck script
runs-on: ubuntu-latest
env:
TERM: xterm
FORCE_COLOR: 1
NODE_VERSION: 16.14 # Should be moved to repository env variable
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- run: yarn --immutable
- name: "Build Code"
run: yarn prepack:all
- name: "Run depcheck script"
run: node scripts/benjies-depcheck.mjs