-
Notifications
You must be signed in to change notification settings - Fork 104
73 lines (64 loc) · 1.96 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
on:
workflow_call:
jobs:
eslint-and-prettier:
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: setup environment
uses: ./.github/actions/setup
with:
actor: lint
- name: lint .env.template files
run: pnpm lint:env-template
- name: Cache ESLint and Prettier
uses: actions/cache@v4
with:
path: |
.eslintcache
node_modules/.cache/prettier
key:
lint-cache-${{ hashFiles('**/pnpm-lock.yaml', 'packages/web/*/tailwind.config.ts',
'tsconfig.eslint.json', 'packages/web/app/tsconfig.json') }}-${{github.sha}}
restore-keys: |
lint-cache-${{ hashFiles('**/pnpm-lock.yaml', 'packages/web/*/tailwind.config.ts',
'tsconfig.eslint.json', 'packages/web/app/tsconfig.json') }}-
- name: eslint
id: eslint
run: |
pnpm lint --cache-strategy content || \
( \
echo "" && \
echo "To fix it, run" && \
echo "$ pnpm run lint:fix" && \
echo "" && \
exit 1 \
)
env:
TIMING: 'true'
- name: prettier
id: prettier
shell: sh
run: |
pnpm lint:prettier || \
( \
echo "" && \
echo "To fix it, run" && \
echo "$ pnpm run prettier" && \
echo "" && \
exit 1 \
)
- name: Generate Types
run: pnpm graphql:generate
- name: Operation Check
run: |
npx graphql-inspector validate \
"packages/web/app/src/**/*.{graphql,tsx}|packages/libraries/cli/**/*.graphql|packages/web/app/src/lib/**/*.ts" \
"packages/**/module.graphql.ts" \
--maxDepth=20 \
--maxAliasCount=20 \
--maxDirectiveCount=20 \
--maxTokenCount=1000