-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (26 loc) · 1.04 KB
/
js.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
on: [push, pull_request, workflow_dispatch]
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- name: svelte-check
run: |
echo "export default {} as Record<string, string>;" > reasonify-headless/index.d.ts
bun -b check
- name: eslint
run: bun -b lint
- name: fix
if: failure() && github.event_name == 'pull_request'
run: |
git fetch origin ${{ github.event.pull_request.head.ref }} --depth=1
git switch ${{ github.event.pull_request.head.ref }}
bun -b lint --fix
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit --all -m "fix: auto-fix eslint errors"
git push