Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
ci:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint
run: pnpm lint

- name: Type check
run: pnpm typecheck

- name: Build
run: pnpm build
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm lint-staged
57 changes: 57 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.10/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"includes": [
"**/src/**/*.ts",
"**/src/**/*.tsx",
"**/tests/**/*.ts",
"!**/node_modules",
"!**/dist",
"!**/.wrangler"
]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"recommended": true
},
"correctness": {
"noUnusedImports": "error",
"noUnusedVariables": "warn"
},
"style": {
"noNonNullAssertion": "warn",
"useImportType": "error"
},
"suspicious": {
"noExplicitAny": "warn",
"noArrayIndexKey": "warn",
"noConfusingVoidType": "off"
},
"complexity": {
"noStaticOnlyClass": "warn"
}
}
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "es5",
"semicolons": "always"
}
}
}
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@
"preview": "vite preview",
"deploy": "vite build && wrangler deploy",
"typecheck": "tsc --noEmit",
"typecheck:client": "tsc --noEmit -p tsconfig.client.json"
"typecheck:client": "tsc --noEmit -p tsconfig.client.json",
"lint": "biome check src tests",
"lint:fix": "biome check --write src tests",
"format": "biome format --write src tests",
"prepare": "husky"
},
"lint-staged": {
"*.{ts,tsx}": [
"biome check --write --no-errors-on-unmatched"
]
},
"keywords": [
"github",
Expand Down Expand Up @@ -41,6 +50,7 @@
"tailwind-merge": "^2.6.0"
},
"devDependencies": {
"@biomejs/biome": "2.3.10",
"@cloudflare/workers-types": "^4.0.0",
"@playwright/test": "1.57.0",
"@types/node": "^20.0.0",
Expand All @@ -49,6 +59,8 @@
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.4.20",
"concurrently": "^9.1.0",
"husky": "9.1.7",
"lint-staged": "16.2.7",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.17",
"tailwindcss-animate": "^1.0.7",
Expand Down
Loading