0.0.6 • Published 6 months ago

@maxchang/biome-config v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@maxchang/biome-config

npm Checked with Biome code style (Is that really a thing?)

Convention

  • 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

Features

  • 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

Usage

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/1.9.4/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.

Recipes

Sort package.json keys

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

References

0.0.6

6 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago