@suin/biome.json
v0.1.0
Published
Opinionated Biome configuration extending ultracite with additional rules
Maintainers
Readme
@suin/biome.json
An opinionated Biome configuration that extends Ultracite with warning-level rules for uninterrupted development flow
The Problem
Setting up Biome configuration often involves:
- Development interruptions - Error-level rules that stop you mid-coding
- Visual confusion - Both compiler errors and linter errors show as red, making it hard to distinguish between actual code issues and style violations
- Manual rule setup - Tedious configuration of hundreds of linting rules
- Team inconsistency - Different developers end up with different configs
- Maintenance burden - Configs become outdated and need constant updates
Before (Manual Configuration)
{
"linter": {
"rules": {
"recommended": true,
"correctness": {
"noUndeclaredVariables": "error", // Blocks development
"useExhaustiveDependencies": "error"
},
"suspicious": {
"noConsole": "error", // Shows as red (same as compiler errors!)
"noDebugger": "error" // Confuses actual bugs with style issues
}
// ... hundreds more rules to configure manually
}
},
"formatter": {
"quoteStyle": "single", // Inconsistent choices
"semicolons": "asNeeded"
}
// No type safety, easy to break
}Result: Development constantly interrupted by linting errors, visual confusion between compiler errors and style violations (both red!), inconsistent team configurations.
After (With @suin/biome.json)
{
"extends": ["@suin/biome.json"]
}Result: Comprehensive, warning-level rules that guide without blocking development, with clear visual distinction between actual errors (red) and style suggestions (yellow warnings).
The Solution
This package provides a pre-compiled Biome configuration that eliminates common development workflow issues:
- Uninterrupted coding flow - All rules set to "warn" so you can keep coding
- Clear visual distinction - Compiler errors show as red, linter suggestions show as yellow warnings
- Zero setup required - Just extend the config and start developing
- Proven rule foundation - Built on Ultracite's battle-tested preset
- Automatic maintenance - Stays current with Biome and Ultracite updates
- Team consistency - Everyone gets the same rules out of the box
The solution is non-invasive and works with your existing Biome setup without breaking changes.
Installation
# Using bun (recommended)
bun add -D @suin/biome.json
# Using npm
npm install --save-dev @suin/biome.json
# Using pnpm
pnpm add -D @suin/biome.jsonQuick Start
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@suin/biome.json", "@suin/biome.json/<framework>"]
}Pick your framework from the list below (for example, Next.js uses both react and next). That's it! Your project now uses the opinionated configuration with warning-level rules for a better development experience.
Usage Examples
Framework-specific Configuration (copy-paste)
Use one of the following presets based on your framework.
Next.js
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": [
"@suin/biome.json",
"@suin/biome.json/react",
"@suin/biome.json/next"
]
}React (Vite, CRA, etc.)
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@suin/biome.json", "@suin/biome.json/react"]
}Vue
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@suin/biome.json", "@suin/biome.json/vue"]
}Svelte
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@suin/biome.json", "@suin/biome.json/svelte"]
}Solid
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@suin/biome.json", "@suin/biome.json/solid"]
}Qwik
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@suin/biome.json", "@suin/biome.json/qwik"]
}Angular
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@suin/biome.json", "@suin/biome.json/angular"]
}Remix
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@suin/biome.json", "@suin/biome.json/remix"]
}Astro
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@suin/biome.json", "@suin/biome.json/astro"]
}With Custom Overrides
You can override any rules in your own biome.json:
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@suin/biome.json", "@suin/biome.json/<framework>"],
"formatter": {
"lineWidth": 120
},
"linter": {
"rules": {
"suspicious": {
"noConsole": "error" // Make console warnings into errors
}
}
}
}Project-Specific Customizations
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@suin/biome.json", "@suin/biome.json/<framework>"],
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded"
}
},
"files": {
"ignore": ["dist/", "build/", "*.config.js"]
}
}TypeScript Projects
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@suin/biome.json", "@suin/biome.json/<framework>"],
"linter": {
"rules": {
"correctness": {
"noUndeclaredVariables": "warn" // Re-enable for TypeScript
}
}
}
}TypeScript Configuration Integration
To avoid duplicate warnings between Biome and TypeScript compiler, you can extend the included TypeScript configuration:
{
"extends": ["@suin/biome.json/tsconfig"],
"compilerOptions": {
"strict": true,
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler"
}
}This disables TypeScript's noUnusedLocals and noUnusedParameters since Biome's noUnusedVariables rule handles unused variable detection.
CI/CD Configuration
⚠️ Important: Handling Warnings in CI
Since this configuration uses warning-level rules for better developer experience, Biome will exit with code 0 (success) even when warnings are found. This is intentional for local development but can be problematic in CI/CD environments where you want to ensure code quality.
The Problem: In CI, developers might miss warnings because the build appears successful:
# ❌ This will pass even with warnings
- run: npx biome ciThe Solution: Use the --error-on-warnings flag in your CI configuration:
# ✅ This will fail if any warnings are found
- run: npx biome ci --error-on-warningsExample CI Configurations
GitHub Actions
name: CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npx biome ci --error-on-warningsGitLab CI
lint:
image: node:20
script:
- npx biome ci --error-on-warningsOther CI Commands
# Format check with error on warnings
npx biome format --error-on-warnings
# Lint check with error on warnings
npx biome lint --error-on-warnings
# Both format and lint with error on warnings
npx biome check --error-on-warningsLocal vs CI Behavior
- Local Development: Warnings don't block your workflow
- CI/CD Pipeline: Warnings are treated as errors to maintain code quality
This approach gives you the best of both worlds: uninterrupted development locally while ensuring high code quality in your repository.
Opinionated Choices
This configuration makes several opinionated choices to promote consistency and best practices. These opinions are documented in OPINIONS.md:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Development Setup
Local development for this repository assumes a Devbox environment. Install Devbox and enter the environment with
devbox shellbefore running the commands below. Bun and Task are provisioned automatically inside the shell.
# Clone the repository
git clone https://github.com/suin/biome.json.git
cd biome.json
# Enter Devbox shell (provisions Bun and Task)
devbox shell
# Install dependencies
bun install
# Update Biome types (if needed)
task update-biome-types
# Build the configuration
task buildMaking Changes
- Edit
src/custom.jsoncwith your changes - Run
task buildto generate the compiled config - Test the changes in a sample project
- Submit a PR with your modifications
Development Scripts
# Build the configuration
task build
# Update Biome TypeScript definitions
task update-biome-types
# Update dependencies and rebuild
bun update ultracite && task build
# Verify build output
cat dist/core.json | head -20Testing Changes
# Test in a sample project
mkdir test-project && cd test-project
echo '{"extends": ["../dist/core.json"]}' > biome.json
echo 'console.log("test")' > test.js
bunx biome check test.js # Should show warnings, not errorsBug Reports
If you find a bug, please create an issue with:
- A minimal reproduction case
- Your environment details (Bun/Node.js version, package versions)
- Expected vs actual behavior
- Output of
bunx biome ragecommand
License
MIT © suin
License Acknowledgment
This package builds upon Ultracite (MIT License) as its foundation, extending it.
Built with ❤️ using Bun, TypeScript, and Biome
