Skip to content

Commit 41b6fc7

Browse files
committed
feat: migrate from ESLint/Prettier to Biome
- Replace ESLint + Prettier with Biome for faster linting/formatting - Add biome.json with equivalent rules and formatting config - Update CI workflow to use 'biome ci' (single command) - Configure VSCode settings and extensions for Biome - Setup pre-commit hook with lint-staged using Biome - Remove debug API routes (test-env, list-sheets) - Add type-safe error handling with custom ApiError classes - Improve README: add CI badge, troubleshooting, CI/CD setup - Update all scripts to use Biome commands - Move autoprefixer to devDependencies (proper placement) BREAKING CHANGE: Prettier plugin for Tailwind removed (Biome doesn't support plugins). Class ordering must be manual or use editor extensions.
1 parent d7703d1 commit 41b6fc7

24 files changed

Lines changed: 553 additions & 1024 deletions

.github/workflows/ci.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
lint-and-type-check:
15-
name: Lint & Type Check
14+
lint-and-check:
15+
name: Lint, Format & Type Check
1616
runs-on: ubuntu-latest
1717

1818
steps:
@@ -27,19 +27,21 @@ jobs:
2727
- name: Install dependencies
2828
run: bun install --frozen-lockfile
2929

30-
- name: Run ESLint
31-
run: bun run lint
32-
33-
- name: Run TypeScript
34-
run: bun run type-check
30+
- name: Cache Biome
31+
uses: actions/cache@v4
32+
with:
33+
path: node_modules/.cache/biome
34+
key: ${{ runner.os }}-biome-${{ hashFiles('**/biome.json') }}
35+
restore-keys: |
36+
${{ runner.os }}-biome-
3537
36-
- name: Check Prettier formatting
37-
run: bun run format:check
38+
- name: Run Biome CI
39+
run: bun run ci
3840

3941
build:
4042
name: Build
4143
runs-on: ubuntu-latest
42-
needs: lint-and-type-check
44+
needs: lint-and-check
4345

4446
steps:
4547
- name: Checkout code
@@ -56,10 +58,10 @@ jobs:
5658
- name: Build application
5759
run: bun run build
5860
env:
59-
GOOGLE_SHEETS_CLIENT_EMAIL: ${{ secrets.GOOGLE_SHEETS_CLIENT_EMAIL }}
60-
GOOGLE_SHEETS_PRIVATE_KEY: ${{ secrets.GOOGLE_SHEETS_PRIVATE_KEY }}
61-
GOOGLE_SHEETS_SPREADSHEET_ID: ${{ secrets.GOOGLE_SHEETS_SPREADSHEET_ID }}
62-
GOOGLE_SHEETS_SHEET_NAME: ${{ secrets.GOOGLE_SHEETS_SHEET_NAME }}
61+
GOOGLE_SHEETS_CLIENT_EMAIL: "ci-test@example.com"
62+
GOOGLE_SHEETS_PRIVATE_KEY: "-----BEGIN PRIVATE KEY-----\nMOCK_KEY_FOR_CI_BUILD_ONLY\n-----END PRIVATE KEY-----\n"
63+
GOOGLE_SHEETS_SPREADSHEET_ID: "mock-spreadsheet-id-for-ci"
64+
GOOGLE_SHEETS_SHEET_NAME: "Sheet1"
6365

6466
- name: Upload build artifacts
6567
uses: actions/upload-artifact@v4

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bun run lint-staged

.prettierignore

Lines changed: 0 additions & 23 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 10 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["biomejs.biome"],
3+
"unwantedRecommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
4+
}

.vscode/settings.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"editor.defaultFormatter": "biomejs.biome",
3+
"editor.formatOnSave": true,
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll.biome": "explicit"
6+
},
7+
"[typescript]": {
8+
"editor.defaultFormatter": "biomejs.biome"
9+
},
10+
"[typescriptreact]": {
11+
"editor.defaultFormatter": "biomejs.biome"
12+
},
13+
"[javascript]": {
14+
"editor.defaultFormatter": "biomejs.biome"
15+
},
16+
"[javascriptreact]": {
17+
"editor.defaultFormatter": "biomejs.biome"
18+
},
19+
"[json]": {
20+
"editor.defaultFormatter": "biomejs.biome"
21+
},
22+
"[jsonc]": {
23+
"editor.defaultFormatter": "biomejs.biome"
24+
},
25+
"eslint.enable": false,
26+
"prettier.enable": false
27+
}

0 commit comments

Comments
 (0)