Add Biome linting and improve webhook error handling

This commit is contained in:
Peter Steinberger
2025-11-24 14:06:52 +01:00
parent 9bdeb723b4
commit d8bfd6ba5e
4 changed files with 897 additions and 593 deletions

32
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: CI
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.23.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Build
run: pnpm build

13
biome.json Normal file
View File

@@ -0,0 +1,13 @@
{
"$schema": "https://biomejs.dev/schemas/biome.json",
"formatter": {
"enabled": true,
"indentWidth": 2
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}

View File

@@ -14,7 +14,10 @@
"start": "tsx src/index.ts",
"warelay": "tsx src/index.ts",
"warely": "tsx src/index.ts",
"lint": "echo \"No linter configured\"",
"lint": "biome check src",
"lint:fix": "biome check --write src",
"format": "biome format src",
"format:fix": "biome format src --write",
"test": "echo \"No tests yet\""
},
"keywords": [],
@@ -34,6 +37,7 @@
"twilio": "^5.10.6"
},
"devDependencies": {
"@biomejs/biome": "^2.3.7",
"@types/body-parser": "^1.19.6",
"@types/express": "^5.0.5",
"@types/node": "^24.10.1",

File diff suppressed because it is too large Load Diff