Skip to content

Commit 76834d2

Browse files
committed
Setup Turborepo monorepo with Biome linting and Husky pre-commit hooks
- Add root package.json with Turborepo, Biome, and Husky devDependencies - Create turbo.json with lint, check, typecheck tasks - Add biome.json with unified formatting config (70 char line width, no semicolons, single quotes) - Create .husky/pre-commit hook to run biome check and turbo typecheck - Add .github/workflows/ci.yml for GitHub Actions CI on push and PRs - Update all 6 workspace package.json files with unique names and Biome scripts - Remove per-project ESLint and Prettier configurations (15 config files) - Delete per-project .gitignore, bun.lock, and bunfig.toml files - Consolidate to root .gitignore and .biomeignore - Reformat 232 source files to match unified Biome conventions - Fix pre-existing TypeScript errors (@flowglad/types imports, SDK type mismatches)
1 parent dc07bef commit 76834d2

276 files changed

Lines changed: 7449 additions & 13070 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.biomeignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
dist
3+
build
4+
coverage
5+
.next
6+
.turbo
7+
.vite
8+
*.lock
9+
bun.lock

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ['**']
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Biome Check
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: oven-sh/setup-bun@v2
16+
with:
17+
bun-version: '1.3.1'
18+
- run: bun install --frozen-lockfile
19+
- run: bunx @biomejs/biome check .
20+
21+
typecheck:
22+
name: TypeScript Typecheck
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: oven-sh/setup-bun@v2
27+
with:
28+
bun-version: '1.3.1'
29+
- run: bun install --frozen-lockfile
30+
- run: bunx turbo typecheck

react-vite/generation-based-subscription/.gitignore renamed to .gitignore

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# Dependencies
22
node_modules/
3+
jspm_packages/
34

45
# Build outputs
56
dist/
67
dist-ssr/
78
build/
89
out/
10+
.next/
11+
12+
# Turbo
13+
.turbo
14+
15+
# Vite
16+
.vite
917

1018
# Environment variables
1119
.env
@@ -45,52 +53,39 @@ pids
4553
*.seed
4654
*.pid.lock
4755

48-
# Coverage directory used by tools like istanbul
56+
# Coverage
4957
coverage/
5058
*.lcov
51-
52-
# nyc test coverage
5359
.nyc_output
5460

55-
# Dependency directories
56-
jspm_packages/
57-
5861
# TypeScript cache
5962
*.tsbuildinfo
6063

61-
# Optional npm cache directory
64+
# Optional caches
6265
.npm
63-
64-
# Optional eslint cache
6566
.eslintcache
66-
67-
# Microbundle cache
6867
.rpt2_cache/
6968
.rts2_cache_cjs/
7069
.rts2_cache_es/
7170
.rts2_cache_umd/
72-
73-
# Optional REPL history
74-
.node_repl_history
75-
76-
# Output of 'npm pack'
77-
*.tgz
78-
79-
# Yarn Integrity file
80-
.yarn-integrity
81-
82-
# parcel-bundler cache (https://parceljs.org/)
8371
.cache
8472
.parcel-cache
8573

86-
# Stores VSCode versions used for testing VSCode extensions
74+
# Misc
75+
*.tgz
76+
.node_repl_history
8777
.vscode-test
88-
89-
# Temporary folders
9078
tmp/
9179
temp/
9280

9381
# Package managers - ALWAYS use bun in this project
9482
package-lock.json
9583
yarn.lock
9684
pnpm-lock.yaml
85+
86+
# TanStack / Nitro specific
87+
.nitro
88+
.tanstack
89+
.wrangler
90+
.output
91+
.vinxi

.husky/pre-commit

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
# Biome: format and lint staged files
4+
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(ts|tsx|json|js|jsx|css)$' || true)
5+
6+
if [ -n "$STAGED_FILES" ]; then
7+
echo "Running Biome check on staged files..."
8+
echo "$STAGED_FILES" | xargs bunx @biomejs/biome check --write --no-errors-on-unmatched
9+
echo "$STAGED_FILES" | xargs git add
10+
fi
11+
12+
# TypeScript: typecheck all workspaces
13+
echo "Running typecheck..."
14+
bunx turbo typecheck

biome.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"formatter": {
9+
"enabled": true,
10+
"indentWidth": 2,
11+
"indentStyle": "space",
12+
"lineWidth": 70,
13+
"lineEnding": "lf"
14+
},
15+
"linter": {
16+
"enabled": true,
17+
"rules": {
18+
"recommended": false
19+
}
20+
},
21+
"javascript": {
22+
"formatter": {
23+
"quoteStyle": "single",
24+
"jsxQuoteStyle": "double",
25+
"semicolons": "asNeeded",
26+
"trailingCommas": "es5",
27+
"arrowParentheses": "always",
28+
"bracketSpacing": true,
29+
"bracketSameLine": false
30+
}
31+
},
32+
"json": {
33+
"formatter": {
34+
"enabled": true
35+
}
36+
},
37+
"css": {
38+
"parser": {
39+
"tailwindDirectives": true
40+
}
41+
}
42+
}

0 commit comments

Comments
 (0)