@igorskyflyer/biome-config
v2.4.1
Published
👽 An opinionated Biome configuration for modern JavaScript and TypeScript projects. Strict linting, consistent formatting, and performance-minded rules, all in one shareable config. 🐺
Downloads
91
Maintainers
Readme
Table of Contents
- ✨ Features
- 🕵🏼 Usage
- ⚙️ Implementation
- 🎯 Motivation
- 📝 Changelog
- 🪪 License
- 💖 Support
- 🧬 Related
- 👨🏻💻 Author
Features
- 👽 Strict linting rules for correctness, security, performance and style
- 🔍 Catches unused variables, imports, parameters and private class members
- 🎨 Custom formatting for
JSONandJS/TS- single quotes,LFendings, 2-space indentation - 🧠 Complexity rules to reduce cognitive load and improve logic clarity
- ⚡ Performance-focused rules - flags barrel files, re-export-all and top-level regex
- 📁 Enforced filenaming conventions with strict casing and
ASCIIrequirements - 🛡️ Security and suspicious checks - no dangerous patterns, console usage, overload signatures and error messaging
- ♿ Accessibility (a11y) warnings for JSX/HTML
- 🧪 Nursery (experimental) rules at warning level
- ✒️ Trailing commas in JS/TS (
all) + no unnecessary semicolons for cleaner diffs - 🧹 Import organization powered by Biome's built-in
organizeImports - 💎 Explicit length checks and adjacent overload signatures
Usage
Install it by executing any of the following, depending on the preferred package manager:
bun add -D @igorskyflyer/biome-configpnpm add -D @igorskyflyer/biome-configyarn add -D @igorskyflyer/biome-confignpm i -D @igorskyflyer/biome-configThen extend the config in biome.json:
biome.json
{
"extends": ["@igorskyflyer/biome-config"]
}Override any rule locally as needed:
biome.json
{
"extends": ["@igorskyflyer/biome-config"],
"linter": {
"rules": {
"suspicious": {
"noConsole": "error"
}
}
}
}Implementation
The config is split into three concern areas - formatting, linting and assist - each with deliberate, documented decisions.
Formatting enforces single quotes, no semicolons (asNeeded), trailing commas everywhere, 2-space indentation, LF line endings and bracketSameLine: false for clean prop/content separation in JSX and HTML attributes. JSON gets its own formatter section for consistency.
Linting enables eight rule groups with clear intent:
- Correctness - unused variables, imports, parameters and private class members
- Security - dangerous patterns (
error) - Accessibility (a11y) - JSX/HTML accessibility issues (
warn) - Nursery - experimental rules (
warn) - Complexity - simplified logic (
error) and cognitive load warnings - Performance - barrel files, re-export-all and top-level regex (
warn) - Style - filenaming (strictCase + ASCII), array literals, block statements, no Yoda expressions, etc.
- Suspicious - explicit
any, console usage, error messaging and adjacent overload signatures
Assist enables Biome's built-in organizeImports for automatic, consistent import ordering on save.
Motivation
Linting and formatting configurations are a source of endless inconsistency across projects. Each project ends up with its own slightly different biome.json, slightly outdated, with no single source of truth.
@igorskyflyer/biome-config solves this by providing one opinionated, versioned config that propagates across all projects via a simple extends - update once, apply everywhere.
Changelog
Read about the latest changes in the CHANGELOG.
License
Licensed under the MIT license.
Support
Related
This package is part of the dotfiles DX config suite - a curated index of independently installable configuration packages for linting, formatting, editing, JS/TS, React, Vue and many more.
Other related packages
🐌 Zing is a C# style String formatter for JavaScript that empowers Strings with positional arguments - composite formatting. 🚀
📜 Formats the provided string as a comment, either a single or a multi line comment for the given programming language. 💻
🌟 An npm module that strongly types file paths! 🥊
🕺 Command. Execution. Made. Simple. ▶
@igorskyflyer/astro-easynav-button
🧭 Add an easy-to-use navigational button (jump to top/bottom) to your Astro site. 🔼
Author
Created by Igor Dimitrijević (@igorskyflyer).
