Skip to content

Commit ec21f2b

Browse files
committed
chore: migrate from ESLint/Prettier to Biome for linting and formatting
1 parent e7c1979 commit ec21f2b

File tree

630 files changed

+7361
-7877
lines changed

Some content is hidden

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

630 files changed

+7361
-7877
lines changed

.husky/pre-commit

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

.husky/pre-push

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

.prettierignore

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

.prettierrc

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

AGENTS.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ Run `bun run test:core`, `bun run test:web`, and `bun run test:backend` after ma
111111

112112
### Linting
113113

114-
- Run `./node_modules/.bin/eslint <changed app files>` before finishing. Treat eslint as required validation for changed implementation files, not an optional follow-up.
115-
- `bunx prettier . --write`
114+
- Run `bun run lint` before finishing. Treat Biome lint and format checks as required validation for changed implementation files, not an optional follow-up.
115+
- Run `bun run lint:fix` to apply safe Biome fixes and formatting.
116116

117117
## Validation
118118

@@ -177,14 +177,14 @@ packages/core/src/
177177

178178
1. **Start Development**: `bun run dev:web` (frontend only, always works)
179179
2. **Run Tests**: `bun run test:core && bun run test:web` (add `&& bun run test:backend` when credentials available)
180-
3. **Run Eslint On Changed Implementation Files**: `./node_modules/.bin/eslint <changed app files>`
181-
4. **Check Code Style**: `bunx prettier . --write`
180+
3. **Run Biome Lint and Format Checks**: `bun run lint`
181+
4. **Apply Safe Fixes When Needed**: `bun run lint:fix`
182182
5. **Manual Validation**: Open <http://localhost:9080/> and verify login page loads
183183

184184
## Cursor Cloud specific instructions
185185

186186
- Prefer running scoped checks for changed areas: `bun run test:core`, `bun run test:web`, `bun run test:backend`, or `bun run test:scripts` as applicable.
187-
- Run `./node_modules/.bin/eslint <changed app files>` before handing off work.
187+
- Run `bun run lint` before handing off work.
188188
- Do not run `bun run test` in restricted environments unless explicitly required.
189189
- For UI-affecting changes in `packages/web`, validate with `bun run dev:web` and confirm behavior in the web dev server.
190190
- If backend work is required, ensure `packages/backend/.env.local` exists by copying `packages/backend/.env.local.example`.
@@ -210,7 +210,7 @@ packages/core/src/
210210
- **Backend won't start**: Missing environment variables in `packages/backend/.env.local`, use web-only development (`bun run dev:web`)
211211
- Environment: Copy from `packages/backend/.env.local.example` to `packages/backend/.env.local` (there is no `.env.example`).
212212
- Webpack dev server warns about a missing `.env.local` file; this is harmless—it falls back to `process.env`.
213-
- Husky pre-push hook runs `bunx prettier . --write`, which can modify files. Ensure working tree is clean or committed before pushing.
213+
- Biome can modify files when run with `bun run lint:fix`. Review the diff before pushing.
214214

215215
### Network Limitations
216216

@@ -314,9 +314,9 @@ packages/core/src/
314314

315315
### Pre-commit Validation
316316

317-
The repository includes Husky hooks that will:
317+
Before committing or pushing:
318318

319-
- Run `bunx lint-staged` on pre-commit (formats code with Prettier)
320-
- Run `bunx prettier . --write` on pre-push (ensures consistent formatting)
319+
- Run `bun run lint` to check lint, formatting, and import organization with Biome.
320+
- Run `bun run lint:fix` when you want Biome to apply safe fixes.
321321

322322
**ALWAYS** ensure your commits pass these checks before pushing.

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run after making changes. Always run `bun run type-check` before handoff.
1313
| `packages/backend` only | `bun run test:backend` |
1414
| `packages/scripts` only | `bun run test:scripts` |
1515
| Cross-package (types/schema) | `bun run test:core && bun run test:web && bun run test:backend && bun run type-check` |
16-
| Lint changed files | `./node_modules/.bin/eslint <file1> <file2>` |
16+
| Lint and format check | `bun run lint` |
1717

1818
Or use the smart detect-and-run script: **`bun run verify`** (checks git diff, runs the right suites + type-check).
1919

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ bun run test:e2e
8282

8383
# Type checking and linting
8484
bun run type-check
85-
bunx prettier . --write
85+
bun run lint
8686
```
8787

8888
## Contributing

biome.json

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.4.12/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"formatter": {
9+
"enabled": true,
10+
"indentStyle": "space",
11+
"indentWidth": 2,
12+
"lineWidth": 80
13+
},
14+
"css": {
15+
"parser": {
16+
"tailwindDirectives": true
17+
}
18+
},
19+
"linter": {
20+
"enabled": true,
21+
"rules": {
22+
"recommended": true,
23+
"a11y": {
24+
"noNoninteractiveElementToInteractiveRole": "warn",
25+
"noNoninteractiveTabindex": "warn",
26+
"noPositiveTabindex": "warn",
27+
"noRedundantRoles": "warn",
28+
"noStaticElementInteractions": "warn",
29+
"noSvgWithoutTitle": "warn",
30+
"useAriaPropsForRole": "warn",
31+
"useAriaPropsSupportedByRole": "warn",
32+
"useButtonType": "warn",
33+
"useFocusableInteractive": "warn",
34+
"useHtmlLang": "warn",
35+
"useSemanticElements": "warn",
36+
"useValidAriaRole": "warn"
37+
},
38+
"correctness": {
39+
"noUnreachable": "warn",
40+
"useExhaustiveDependencies": "warn",
41+
"useHookAtTopLevel": "warn",
42+
"useYield": "warn"
43+
},
44+
"style": {
45+
"useImportType": {
46+
"level": "warn",
47+
"options": {
48+
"style": "inlineType"
49+
}
50+
}
51+
},
52+
"suspicious": {
53+
"noArrayIndexKey": "warn",
54+
"noAssignInExpressions": "warn",
55+
"noConsole": "off",
56+
"noDoubleEquals": "warn",
57+
"noDuplicateTestHooks": "warn",
58+
"noExportsInTest": "warn",
59+
"useIterableCallbackReturn": "warn"
60+
},
61+
"nursery": {
62+
"useSortedClasses": {
63+
"level": "warn",
64+
"options": {
65+
"attributes": ["className", "class"],
66+
"functions": ["clsx", "classnames", "cn"]
67+
}
68+
}
69+
}
70+
}
71+
},
72+
"assist": {
73+
"actions": {
74+
"source": {
75+
"organizeImports": {
76+
"level": "on",
77+
"options": {
78+
"groups": [
79+
[":BUN:", ":NODE:"],
80+
":PACKAGE:",
81+
["@core/**", "!@core"],
82+
["@web/**", "!@web"],
83+
["@backend/**", "!@backend"],
84+
":PATH:"
85+
]
86+
}
87+
}
88+
}
89+
}
90+
},
91+
"overrides": [
92+
{
93+
"includes": ["packages/web/**/*.ts", "packages/web/**/*.tsx"],
94+
"linter": {
95+
"rules": {
96+
"suspicious": {
97+
"noConsole": {
98+
"level": "warn",
99+
"options": {
100+
"allow": ["warn", "error"]
101+
}
102+
}
103+
}
104+
}
105+
}
106+
},
107+
{
108+
"includes": [
109+
"**/__tests__/**",
110+
"**/*.test.ts",
111+
"**/*.test.tsx",
112+
"**/*.spec.ts",
113+
"**/*.spec.tsx"
114+
],
115+
"linter": {
116+
"rules": {
117+
"suspicious": {
118+
"noConsole": "off"
119+
}
120+
}
121+
}
122+
},
123+
{
124+
"includes": ["**/*.js", "**/*.mjs", "**/*.cjs"],
125+
"linter": {
126+
"rules": {
127+
"style": {
128+
"useImportType": "off"
129+
}
130+
}
131+
}
132+
}
133+
],
134+
"files": {
135+
"ignoreUnknown": true,
136+
"includes": [
137+
"**",
138+
"!build",
139+
"!coverage",
140+
"!logs",
141+
"!node_modules",
142+
"!*.min.js",
143+
"!bun.lock"
144+
]
145+
}
146+
}

0 commit comments

Comments
 (0)