0.6.4 • Published 5 months ago

@tutods/biome-config v0.6.4

Weekly downloads
-
License
-
Repository
github
Last release
5 months ago

Biome Config


📄 Goal

This configuration package has the purpose of store my common configurations used on Biome.

💡️ What you will find?

For now, you will found 3 configurations, being two of them based on the main one:

  • base.json: stores the basic/global configuration;
  • nestjs.jsonc: stores the configuration for Nest.js projects (allowing decorators, etc.);
  • solidjs.json: stores the configuration for SolidJS projects, changing a few linter rules (like noReactSpecificProps).

❓ How to install and use it?

To install my package and use it is very simple, you only need to follow the steps below.

  1. Install the package using your package manager (list of commands above): PNPM

      pnpm add -D @tutods/biome-config @biomejs/biome

    Yarn

      yarn add -D @tutods/biome-config @biomejs/biome

    npm

      npm install -D @tutods/biome-config @biomejs/biome
  2. Create the configuration file: PNPM

      pnpm biome init

    Yarn

      yarn biome init

    npm

      npx biome init
  3. On the biome.json file (generated on the previous step), remove everything except the $schema and vcs, adding the line above:

      "extends": ["@tutods/biome-config"]
    • If you want to use the nestjs or solidjs config you only need to add another entry with @tutods/biome-config/nestjs or @tutods/biome-config/solidjs according to the configuration you want to use.
  4. To finish, is missing to setup the scripts on your package.json, I usually use the following scripts:

      "lint": "biome check .",
      "lint:fix": "biome check --no-errors-on-unmatched --write .",
      "lint:staged": "biome check --no-errors-on-unmatched --staged .",
      "lint:ci": "biome ci --no-errors-on-unmatched .",

    ⚠️ Note: you can use your own scripts!

Examples of usage

Below, you can find two examples of usages:

  • for a React project, using only the base configuration;
  • for a Nest.js project, using the base configuration and the specific Nest.js configuration with specific rules.

React project

{
  "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
  "extends": [
    "@tutods/biome-config"
  ]
}

Nest.js Project

{
  "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
  "extends": [
    "@tutods/biome-config",
    "@tutods/biome-config/nestjs"
  ]
}
0.6.4

5 months ago

0.6.3

5 months ago

0.5.0

5 months ago

0.4.2

5 months ago

0.4.0

5 months ago

0.3.0

5 months ago

0.2.0

5 months ago