@heybrostudio/biome-config

0.0.6 • Public • Published

Biome config for @heybrostudio

Biome config for @heybrostudio.

NPM Version NPM License NPM Version

Usage

Install

bun(pnpm|npm) add -D @biomejs/biome @heybrostudio/biome-config

Add to biome.json file

{
  "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
  "extends": ["./node_modules/@heybrostudio/biome-config/biome.json"],
  // ...
}

Add script for package.json

For example:

{
  "scripts": {
    "lint": "biome lint .",
    "lint:fix": "biome lint . --apply"
  }
}

Lint Staged

If you want to apply lint and auto-fix before each commit, you can add the following to package.json:

{
  "simple-git-hooks": {
    "pre-commit": "bun lint-staged"
  },
  "lint-staged": {
    "*": "eslint --fix"
  }
}

Then install the dependencies:

bun(pnpm|npm) i -D lint-staged simple-git-hooks

Finally, activate the hooks:

bunx(pnpx|npx) simple-git-hooks

VS Code support (auto fix)

Install Biome VS Code Extension

Add the following settings to your .vscode/settings.json:

{
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "quickfix.biome": "explicit",
    "source.organizeImports.biome": "explicit"
  },
  "[javascript]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "[typescript]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "[javascriptreact]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "[json]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "biomejs.biome"
  }
}

License

MIT License © 2024-PRESENT Caven Ding

Readme

Keywords

Package Sidebar

Install

npm i @heybrostudio/biome-config

Weekly Downloads

2

Version

0.0.6

License

MIT

Unpacked Size

5.1 kB

Total Files

4

Last publish

Collaborators

  • heybrostudio