Skip to content

Commit c175d8c

Browse files
JacobCoffeeclaude
andcommitted
refactor: migrate from npm+prettier to bun+biome
- Install @biomejs/[email protected] via bun - Replace Prettier with Biome in .pre-commit-config.yaml - Update Makefile install-frontend target to use bun install - Add biome.json configuration matching previous Prettier settings - Update package.json scripts to use bunx biome - Remove .prettierrc and package-lock.json - Add bun.lockb for dependency locking - Update CLAUDE.md and README.md to reference bun and Biome - Configure Biome to ignore TailwindCSS directives and generated files - Fix tailwind.config.js unused variable warning All CI checks pass (lint, type-check, fmt, test). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 2c839f8 commit c175d8c

File tree

11 files changed

+683
-1304
lines changed

11 files changed

+683
-1304
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ repos:
3737
rev: 1.20.0
3838
hooks:
3939
- id: blacken-docs
40-
- repo: https://github.com/pre-commit/mirrors-prettier
41-
rev: v4.0.0-alpha.8
40+
- repo: https://github.com/biomejs/pre-commit
41+
rev: "v0.4.0"
4242
hooks:
43-
- id: prettier
44-
exclude: "_templates|.git"
43+
- id: biome-check
44+
additional_dependencies: ["@biomejs/[email protected]"]
4545
# - repo: https://github.com/thibaudcolas/curlylint
4646
# rev: v0.13.1
4747
# hooks:

.prettierrc

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

CLAUDE.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,20 @@ byte/
146146

147147
## 🔧 Technology Stack
148148

149-
| Component | Tool | Notes |
150-
| ------------------- | --------------------------------- | ------------------------------------- |
151-
| **Package Manager** | uv | Fast, PEP 517 build backend |
152-
| **Linting** | ruff | Replaces black, flake8, isort |
153-
| **Type Checking** | ty | Type checks all services and packages |
154-
| **Testing** | pytest + pytest-asyncio | Coverage required |
155-
| **Git Hooks** | prek | NOT pre-commit |
156-
| **Web Framework** | Litestar 2.4.3+ | ASGI, OpenAPI, Jinja2 |
157-
| **Discord Bot** | discord.py 2.3.2+ | Slash commands, views |
158-
| **ORM** | SQLAlchemy 2.0 + Advanced Alchemy | Async, repository pattern |
159-
| **Database** | PostgreSQL 15+ | Via Docker or Railway |
160-
| **Frontend** | TailwindCSS + DaisyUI | Compiled via separate watcher |
149+
| Component | Tool | Notes |
150+
| ------------------------ | --------------------------------- | ------------------------------------- |
151+
| **Package Manager (PY)** | uv | Fast, PEP 517 build backend |
152+
| **Package Manager (JS)** | bun | Fast JavaScript runtime & package manager |
153+
| **Linting (Python)** | ruff | Replaces black, flake8, isort |
154+
| **Linting (JS/TS)** | Biome | Fast formatter & linter (replaces Prettier) |
155+
| **Type Checking** | ty | Type checks all services and packages |
156+
| **Testing** | pytest + pytest-asyncio | Coverage required |
157+
| **Git Hooks** | prek | NOT pre-commit |
158+
| **Web Framework** | Litestar 2.4.3+ | ASGI, OpenAPI, Jinja2 |
159+
| **Discord Bot** | discord.py 2.3.2+ | Slash commands, views |
160+
| **ORM** | SQLAlchemy 2.0 + Advanced Alchemy | Async, repository pattern |
161+
| **Database** | PostgreSQL 15+ | Via Docker or Railway |
162+
| **Frontend** | TailwindCSS + DaisyUI | Compiled via separate watcher |
161163

162164
**Documentation**: Sphinx, Context7 MCP, allowed WebFetch domains:
163165

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ install-prek: ## Install prek and install hooks
5353
install-frontend: ## Install the frontend dependencies
5454
@echo "=> Installing frontend dependencies"
5555
@nodeenv --python-virtualenv
56-
@npm install
56+
@bun install
5757
@echo "=> Frontend dependencies installed"
5858

5959
.PHONY: install-backend
@@ -96,7 +96,7 @@ refresh-container: clean-container up-container load-container ## Refresh the By
9696

9797
##@ Code Quality
9898

99-
lint: ## Runs prek hooks; includes ruff linting, codespell, black
99+
lint: ## Runs prek hooks; includes ruff linting, codespell, biome
100100
@$(UV) run --no-sync prek run --all-files --skip ty
101101

102102
fmt-check: ## Runs Ruff format in check mode (no changes)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ All contributions are welcome! Please see [CONTRIBUTING](./CONTRIBUTING.rst) for
115115
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
116116

117117
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
118-
<!-- prettier-ignore-start -->
118+
<!-- biome-ignore format: auto-generated by all-contributors -->
119119
<!-- markdownlint-disable -->
120120
<table>
121121
<tbody>
@@ -128,7 +128,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
128128
</table>
129129

130130
<!-- markdownlint-restore -->
131-
<!-- prettier-ignore-end -->
131+
<!-- biome-ignore-end -->
132132

133133
<!-- ALL-CONTRIBUTORS-LIST:END -->
134134

biome.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.3.7/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"includes": ["**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx", "**/*.json", "**/*.html", "**/*.css"],
11+
"experimentalScannerIgnores": [
12+
"_templates/**",
13+
".git/**",
14+
"node_modules/**",
15+
".venv/**",
16+
"dist/**",
17+
"build/**",
18+
"**/*.pyc",
19+
"__pycache__/**",
20+
"**/*.egg-info/**",
21+
".pytest_cache/**",
22+
".ruff_cache/**",
23+
"docs/_build/**",
24+
"**/*.svg",
25+
"services/api/src/byte_api/domain/web/resources/style.css"
26+
]
27+
},
28+
"formatter": {
29+
"enabled": true,
30+
"formatWithErrors": false,
31+
"indentStyle": "space",
32+
"indentWidth": 2,
33+
"lineEnding": "lf",
34+
"lineWidth": 120,
35+
"attributePosition": "auto"
36+
},
37+
"linter": {
38+
"enabled": true,
39+
"rules": {
40+
"recommended": true,
41+
"suspicious": {
42+
"noUnknownAtRules": "off",
43+
"noDuplicateProperties": "off"
44+
}
45+
}
46+
},
47+
"javascript": {
48+
"formatter": {
49+
"jsxQuoteStyle": "double",
50+
"quoteProperties": "asNeeded",
51+
"trailingCommas": "all",
52+
"semicolons": "asNeeded",
53+
"arrowParentheses": "asNeeded",
54+
"bracketSameLine": true,
55+
"quoteStyle": "double",
56+
"attributePosition": "auto",
57+
"bracketSpacing": true
58+
}
59+
},
60+
"json": {
61+
"formatter": {
62+
"trailingCommas": "none"
63+
}
64+
}
65+
}

0 commit comments

Comments
 (0)