@gabbezeira/biome-airbnb
v1.0.8
Published
A configuration package that sets up Airbnb's JavaScript code formatting style for Biome.js, including linting, import organization, and formatting rules. Ideal for developers who want to quickly apply Airbnb's JavaScript styling conventions to their proj
Downloads
115
Maintainers
Readme
@gabbezeira/biome-airbnb
A comprehensive Airbnb-style JavaScript configuration package for Biome.js — bringing the best practices of Airbnb code conventions directly into your Biome projects.
✨ Features
- Airbnb Style Guide: Consistent JavaScript styling with Airbnb’s best practices.
- Fully Configurable: Extensible for different environments (React, Node.js).
- Quick Setup: Simple integration with
extends
in yourbiome.json
. - Formatted Imports: Auto-organization of imports for cleaner code.
📦 Installation
Install the package as a dev dependency:
npm install -D @gabbezeira/biome-airbnb
🚀 Usage
In your project root, create or edit your biome.json
file to extend from @gabbezeira/biome-airbnb
:
{
"extends": "@gabbezeira/biome-airbnb"
}
For a custom setup, you can also include setupBiome.js
:
// setupBiome.js
module.exports = {
"extends": "@gabbezeira/biome-airbnb",
// additional custom configurations...
};
Then, reference it in your biome.json
:
{
"extends": "./setupBiome.js"
}
🔧 Configuration Options
Example setupBiome.js
module.exports = {
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"extends": "@gabbezeira/biome-airbnb",
"vcs": {
"enabled": true,
"clientKind": "git"
},
"formatter": {
"indentStyle": "tab",
"lineWidth": 100
}
};
📜 Supported Rules
This configuration package follows the Airbnb style guide, including:
- Quotes: Single quotes for JavaScript, double for JSON.
- Semicolons: Inserted as needed.
- Trailing Commas: Required in multi-line lists and objects.
- Arrow Function Parentheses: Always required for clarity.
For a full list of rules, visit Biome’s documentation.
🛠️ Commands
Run Biome linting and formatting directly in your project:
npx biome check .
npx biome format .
📄 License
This project is licensed under the ISC License - see the LICENSE file for details.
👏 Contribute
Found a bug or have an idea? Feel free to open an issue or submit a pull request.