skills/wenerme/ai/biome-lint

biome-lint

SKILL.md

Biome Lint & TypeScript Type-Check

Quick Reference

Error Fix
noImplicitAnyLet Add type: let x;let x: Type;
noUnusedVariables Prefix _: const fooconst _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

Weekly Installs
14
Repository
wenerme/ai
GitHub Stars
2
First Seen
14 days ago
Installed on
gemini-cli14
opencode14
codebuddy14
github-copilot14
codex14
kimi-cli14