xiaohongshu
xiaohongshu
biome-setup
Biome linter/formatter setup. Use when configuring Biome as an alternative to ESLint + Prettier.
Full skill instructions
This skill covers Biome configuration for TypeScript projects as an alternative to ESLint + Prettier.
Use this skill when:
ONE TOOL, ZERO DEPENDENCIES - Biome replaces both ESLint and Prettier with 10-100x better performance.
npm install -D @biomejs/biome
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "error",
"noImplicitAnyLet": "error"
},
"correctness": {
"noUnusedVariables": "error",
"noUnusedImports": "error"
},
"style": {
"noNonNullAssertion": "warn",
"useConst": "error",
"useTemplate": "error"
},
"complexity": {
"noBannedTypes": "error",
"noUselessTypeConstraint": "error"
}
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"javascript": {
"formatter": {
"semicolons": "always",
"quoteStyle": "single",
"trailingCommas": "all",
"arrowParentheses": "always"
}
},
"files": {
"ignore": ["node_modules", "dist", "coverage"]
}
}
{
"scripts": {
"lint": "biome check .",
"lint:fix": "biome check --write .",
"format": "biome format --write .",
"format:check": "biome format ."
}
}
{
"linter": {
"rules": {
"suspicious": {
"noExplicitAny": "error",
"noImplicitAnyLet": "error",
"noConfusingVoidType": "error",
"noAsyncPromiseExecutor": "error"
}
}
}
}
noExplicitAny:
// ❌ Error
function process(data: any) { }
// ✅ OK
function process(data: unknown) { }
noImplicitAnyLet:
// ❌ Error
let value; // implicit any
// ✅ OK
let value: string;
let value: unknown;
{
"linter": {
"rules": {
"correctness": {
"noUnusedVariables": "error",
"noUnusedImports": "error",
"noConstantCondition": "error",
"noUndeclaredVariables": "error"
}
}
}
}
{
"linter": {
"rules": {
"style": {
"useConst": "error",
"useTemplate": "error",
"noVar": "error",
"useShorthandFunctionType": "error",
"useExportType": "error",
"useImportType": "error"
}
}
}
}
useExportType / useImportType:
// ❌ Error - using value import for type
import { User } from './types';
export { User };
// ✅ OK - type-only imports/exports
import type { User } from './types';
export type { User };
{
"javascript": {
"formatter": {
"semicolons": "always",
"quoteStyle": "single",
"jsxQuoteStyle": "double",
"trailingCommas": "all",
"arrowParentheses": "always",
"bracketSpacing": true,
"bracketSameLine": false
}
}
}
{
"json": {
"formatter": {
"trailingCommas": "none"
}
}
}
{
"overrides": [
{
"include": ["**/*.test.ts", "**/*.test.tsx"],
"linter": {
"rules": {
"suspicious": {
"noExplicitAny": "off"
}
}
}
},
{
"include": ["*.config.js", "*.config.ts"],
"linter": {
"rules": {
"style": {
"noDefaultExport": "off"
}
}
}
}
]
}
Install "Biome" extension from VS Code marketplace.
{
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
# Check all files
biome check .
# Check and fix
biome check --write .
# Check specific files
biome check src/
# Check with specific rules
biome check --diagnostic-level=error .
# Check formatting
biome format .
# Apply formatting
biome format --write .
# Format specific files
biome format --write src/**/*.ts
# Check only (exit non-zero on issues)
biome ci .
npm uninstall eslint prettier eslint-config-prettier @typescript-eslint/eslint-plugin @typescript-eslint/parser
npm install -D @biomejs/biome
npx biome init
{
"scripts": {
"lint": "biome check .",
"format": "biome format --write ."
}
}
rm .eslintrc.json .eslintrc.js .prettierrc .prettierignore
| ESLint Rule | Biome Rule |
|---|---|
@typescript-eslint/no-explicit-any | suspicious/noExplicitAny |
@typescript-eslint/no-unused-vars | correctness/noUnusedVariables |
no-var | style/noVar |
prefer-const | style/useConst |
prefer-template | style/useTemplate |
Biome does not support:
Use ESLint if you need:
{
"lint-staged": {
"*.{ts,tsx,js,jsx,json,md}": [
"biome check --write --no-errors-on-unmatched"
]
}
}
name: Lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm ci
- run: npx biome ci .
biome ci in CI pipelinesbiome cixiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience