-
Notifications
You must be signed in to change notification settings - Fork 600
47 lines (39 loc) · 1.1 KB
/
lint.yml
File metadata and controls
47 lines (39 loc) · 1.1 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
name: Lint
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10.10.0
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run ESLint and Check Formatting
run: |
pnpm lint:fix
if [ -n "$(git status --porcelain -uno)" ]; then
echo "Error: The codebase is not properly formatted or has linting issues that can be auto-fixed."
echo "Please run 'pnpm lint:fix' locally, commit the changes, and push again."
git status --porcelain -uno
git diff
exit 1
fi
- name: Run Type Check
run: pnpm exec tsc -b