0.6.4 • Published 9 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/biomeyarn add -D @tutods/biome-config @biomejs/biomenpm install -D @tutods/biome-config @biomejs/biomeCreate the configuration file:
pnpm biome inityarn biome initnpx biome initOn the
biome.jsonfile (generated on the previous step), remove everything except the$schemaandvcs, adding the line above:"extends": ["@tutods/biome-config"]- If you want to use the
nestjsorsolidjsconfig you only need to add another entry with@tutods/biome-config/nestjsor@tutods/biome-config/solidjsaccording 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"
]
}