- Based on recommended rules from Biome
- Using spaces as indentation, default 4 spaces for JS/TS
- Sorted imports, dangling commas
- Single quotes, semicolons as needed
- Automatic import organization
- Git integration, respects
.gitignore
by default - Customizable TypeScript, JavaScript, and JSON rules
- Predefined ignore patterns for common files/directories
-
Partial support for
.vue
,.svelte
, and.astro
files
Not sure how to set up Biome? Take a look at the Getting Started guide from the official docs.
pnpm i -D @maxchang/biome-config
yarn add -D @maxchang/biome-config
npm i @maxchang/biome-config --save-dev
Extend the config in your biome.json
file:
{
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
"extends": ["@maxchang/biome-config"]
}
Add the following scripts to your package.json
:
"scripts": {
"lint": "biome check",
"lint:fix": "biome check --write ."
}
If you use VS Code, here is a reference settings.json
, with automatic formatting on save and Biome as the default formatter for languages needed.
Since Biome has no plans to implement something like prettier-plugin-packagejson and currently lacks equivalent rules such as jsonc/sort-keys
*, you can use sort-package-json as a workaround.
pnpx sort-package-json
npx sort-package-json