are-we-biome-yet
v0.0.2
Published
Are we Biome yet? -- Compare your eslint config to existing Biome configs
Readme
Are We Biome Yet?
A CLI tool to analyze your ESLint configuration and determine compatibility with Biome, the fast formatter and linter written in Rust.
What it does
This tool helps you migrate from ESLint to Biome by:
- Analyzing your ESLint config - Reads your ESLint configuration files and extracts the rules you're using
- Mapping to Biome equivalents - Cross-references your ESLint rules with Biome's available rules using the official Biome rules metadata
- Providing compatibility report - Shows which rules have Biome equivalents and which don't
- Calculating migration readiness - Gives you a percentage of how ready your config is for Biome migration
Usage
Or run directly with:
npx are-we-biome-yetUsage
Basic Analysis
# Analyze current directory
are-we-biome-yet .
# Analyze specific path
are-we-biome-yet /path/to/your/file.js
# Output as JSON for programmatic use
are-we-biome-yet . --jsonExample Output
🔍 Analyzing ESLint configuration...
Found 15 ESLint rules in your configuration
✅ Compatible with Biome (13 rules):
• no-unused-vars → noUnusedVariables (javascript/complexity)
• no-console → noConsole (javascript/suspicious)
• prefer-const → useConst (javascript/style)
• no-var → noVar (javascript/style)
• semi → useSemicolons (javascript/style)
• quotes → useSingleQuote (javascript/style)
• indent → useIndent (javascript/style)
• comma-dangle → useTrailingCommas (javascript/style)
• no-trailing-spaces → noTrailingSpaces (javascript/style)
• eol-last → useNewlineAtEndOfFile (javascript/style)
• no-multiple-empty-lines → noMultipleEmptyLines (javascript/style)
• no-tabs → noTabs (javascript/style)
• no-debugger → noDebugger (javascript/suspicious)
❌ No Biome equivalent (2 rules):
• @typescript-eslint/no-explicit-any
• react-hooks/exhaustive-deps
📊 Compatibility: 86.67% (13/15 rules)Development
Prerequisites
- Node.js 18+
- Bun (for package management)
Setup
Clone the repository
git clone https://github.com/your-username/are-we-biome-yet.git cd are-we-biome-yetInstall dependencies
bun installBuild the project
bun run build
Project Structure
are-we-biome-yet/
├── src/
│ ├── commands/
│ │ ├── analyze.ts # Main analysis logic
│ │ └── biome.ts # Biome rules fetching and mapping
│ ├── utils/
│ │ └── logger.ts # Logging utilities
│ └── index.ts # CLI entry point
├── biome.json # Biome configuration
├── package.json # Dependencies and scripts
├── tsup.config.ts # Build configuration
└── tsconfig.json # TypeScript configurationKey Components
src/commands/analyze.ts
- Parses ESLint configuration files
- Extracts rules from various ESLint config formats
- Orchestrates the analysis process
src/commands/biome.ts
- Fetches Biome rules metadata from
https://biomejs.dev/metadata/rules.json - Maps ESLint rules to Biome equivalents
- Identifies Biome-exclusive rules
src/utils/logger.ts
- Provides consistent logging across the application
- Supports different log levels and output formats
Development Commands
# Build the project
bun run build
# Run in development mode
bun run dev
# Run tests
bun run test
# Lint with Biome
bun run lint
# Format with Biome
bun run format
# Type check
bun run typecheckAdding New Features
- New Commands: Add new command files in
src/commands/ - Rule Mappings: The Biome rules are automatically fetched from the official metadata endpoint
- Configuration Parsers: Extend the ESLint config parsing in
analyze.ts
Testing
# Run tests
bun run test
# Run tests in watch mode
bun run test:watchContributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run tests and linting:
bun run test && bun run lint - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
How it Works
1. ESLint Configuration Parsing
The tool supports multiple ESLint configuration formats:
.eslintrc.js.eslintrc.json.eslintrc.yamleslint.config.js(flat config)package.jsoneslint field
2. Rule Extraction
Extracts rules from:
- Direct rule configurations
- Extended configurations (like
eslint:recommended) - Plugin rules (with proper prefix handling)
3. Biome Rule Mapping
- Fetches the latest Biome rules from the official metadata endpoint
- Maps ESLint rules to Biome equivalents based on the
sourcesfield - Handles plugin prefixes (e.g.,
@typescript-eslint/→ base rule name)
4. Compatibility Analysis
- Calculates which rules have Biome equivalents
- Provides detailed mapping information
- Shows compatibility percentage
License
MIT License - see LICENSE file for details.
Acknowledgments
- Biome team for the excellent tool and metadata API
- ESLint community for the comprehensive linting ecosystem
