Biome is a fast, all-in-one toolchain for JavaScript and TypeScript that combines linting, formatting, and more in a single tool.
Why Biome?
- Speed: 10-100x faster than ESLint + Prettier
- One tool: Linting and formatting together
- Zero config: Works out of the box
- Rich diagnostics: Helpful error messages
Getting Started
# Install
npm install --save-dev @biomejs/biome
# Initialize config
npx biome init
# Format files
npx biome format --write .
# Lint files
npx biome lint .
# Both at once
npx biome check --write .
Configuration
// biome.json
{
"formatter": {
"indentStyle": "space",
"indentWidth": 2
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noForEach": "warn"
}
}
}
}
Migration from ESLint
# Auto-migrate ESLint config
npx biome migrate eslint
Comments (0)
Leave a Comment
No comments yet. Be the first to share your thoughts!