biome-lint
Biome Lint & TypeScript Type-Check
Quick Reference
| Error | Fix |
|---|---|
noImplicitAnyLet |
Add type: let x; → let x: Type; |
noUnusedVariables |
Prefix _: const foo → const _foo |
noUnusedFunctionParameters |
Rename in destructure: { param } → { param: _param } |
noEmptyPattern |
Replace {} with _opts: object |
noUnreachable |
Remove dead code or wrap in block comment |
noInvalidUseBeforeDeclaration |
Move declaration before usage or extract to const |
TS2322 |
Type assertion or filter: as Record<string, string> |
TS2345 |
Non-null assertion or default: value! or value ?? '' |
TS7030 |
Add explicit return: return undefined; |
TS2339 |
Type assertion to extend: as Type & { prop?: T } |
Workflow
Biome Lint
# 1. Auto-fix
pnpm biome lint ./src --write
# 2. Check remaining errors
pnpm biome lint ./src
# 3. Fix import type issues
npx -y @biomejs/biome lint --only=style/useImportType ./src --write
TypeScript Check
# Single package
pnpm tsgo -p tsconfig.json --skipLibCheck --maxNodeModuleJsDepth 0 --noEmit
# All packages
pnpm -r exec just typecheck
Per-Package Rule Override
Create local biome.json to override rules:
{
"root": false,
"extends": "//",
"linter": {
"rules": {
"correctness": { "useHookAtTopLevel": "warn" },
"a11y": { "useButtonType": "warn" }
}
}
}
biome-ignore Comments
// biome-ignore lint/suspicious/noSelfCompare: NaN check
return x !== x;
// biome-ignore lint/correctness/noConstructorReturn: proxy pattern
return new Proxy();
Detailed Guides
- Biome fixes — Full fix examples for each Biome rule
- TypeScript fixes — TS errors, ES version issues, cross-package deps
- Breaking changes — Zod 4, vitest 4, react-router v7, etc.
More from wenerme/ai
glab-cli
Use when interacting with GitLab via the glab CLI: creating/reviewing merge requests, managing issues, monitoring CI/CD pipelines, making API calls, or performing any GitLab operation from the terminal. Triggers on glab, gitlab cli, merge request, MR create, pipeline status, ci lint.
32mikro-orm-v6-to-v7
Use when upgrading @mikro-orm packages from v6 to v7, fixing v7 runtime/type errors (decorator SyntaxError, persistAndFlush removed, nativeInsert not found), adapting knex to kysely or better-sqlite to new SQLite drivers, running MikroORM in Edge/Bun/node:sqlite environments, or choosing between defineEntity vs decorator entity definitions. Triggers on "mikro-orm v7", "persistAndFlush", "@mikro-orm/decorators", "@mikro-orm/sql", "defineEntity", "bun:sqlite mikro-orm".
31orpc-implementation-sops
Use when building, updating, or refactoring oRPC contracts, server handlers, clients, or React Query integration
30zustand-mutative-pattern
Use when implementing React state management with Zustand, including context-scoped stores, mutative updates, or actions namespace patterns
25tmux-session-manager
Use when executing commands, running builds, starting services, or monitoring logs in a visible tmux pane
25wode-db-schema-pattern
Use when designing, creating, or modifying PostgreSQL table schemas in the Wode project, including ID strategy, multi-tenant isolation, or naming conventions
24