0.6.4 • Published 5 months ago
@tutods/biome-config v0.6.4
📄 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 (likenoReactSpecificProps
).
❓ How to install and use it?
To install my package and use it is very simple, you only need to follow the steps below.
Install the package using your package manager (list of commands above):
pnpm add -D @tutods/biome-config @biomejs/biome
yarn add -D @tutods/biome-config @biomejs/biome
npm install -D @tutods/biome-config @biomejs/biome
Create the configuration file:
pnpm biome init
yarn biome init
npx biome init
On the
biome.json
file (generated on the previous step), remove everything except the$schema
andvcs
, adding the line above:"extends": ["@tutods/biome-config"]
- If you want to use the
nestjs
orsolidjs
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.
- If you want to use the
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"
]
}