-
Notifications
You must be signed in to change notification settings - Fork 155
48 lines (38 loc) · 1.24 KB
/
lint.yml
File metadata and controls
48 lines (38 loc) · 1.24 KB
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
name: Code Cleanliness
on: [pull_request]
env:
NODE_VERSION: 20
permissions:
contents: read
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps: # list of steps
- name: Harden Runner
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2
with:
egress-policy: audit
- name: Install NodeJS
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Code Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- name: Install Dependencies
run: npm install --workspaces
- name: Code Linting
run: |
npm run lint
npm run lint --workspaces --if-present
- name: Check formatting
run: npm run format:check
- name: Check generated config types are up-to-date
run: |
npm run generate-config-types
if ! git diff --exit-code src/config/generated/config.ts; then
echo "Generated config types are out of date. Run 'npm run generate-config-types' locally and commit the changes."
exit 1
fi