Skip to content

Commit 3c3163d

Browse files
committed
Fix scripts and add workflow
1 parent a79a107 commit 3c3163d

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

.github/workflows/check.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Checks
2+
3+
on:
4+
push:
5+
branches: ['**']
6+
pull_request:
7+
8+
jobs:
9+
lint:
10+
# Only run on PRs if the source branch is on someone else's repo
11+
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v5
17+
18+
- name: Setup Bun
19+
uses: oven-sh/setup-bun@v2
20+
with:
21+
bun-version: latest
22+
23+
- name: Install dependencies
24+
run: bun install
25+
26+
- name: Run linter
27+
run: bun run lint

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
"build": "astro build",
88
"preview": "astro preview",
99
"astro": "astro",
10-
"lint": "eslint . --cache",
11-
"lint:fix": "eslint . --fix --cache",
1210
"format": "prettier --write .",
13-
"format:check": "prettier --check .",
14-
"check": "bun run format:check && bun run lint"
11+
"lint:eslint": "eslint . --cache",
12+
"lint:prettier": "prettier --check .",
13+
"lint": "bun run lint:eslint && bun run lint:prettier"
1514
},
1615
"dependencies": {
1716
"@astrojs/cloudflare": "^12.6.10",

0 commit comments

Comments
 (0)