@alexanderliu/biome-config
v1.4.0
Published
Biome config with strict linter rules.
Readme
@alexanderliu/biome-config-linter
Biome config with strict linter rules.
Usage
Install Packages
Check package.json package of this package to determine the correct biome version.
pnpm add -D -E @alexanderliu/biome-config-linter @biomejs/[email protected]Biome Config
biome.json:
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@alexanderliu/biome-config-linter/biome"],
"files": {
"includes": ["**"]
}
}package.json Scripts
{
"format:check": "biome format",
"format:write": "biome format --write",
"lint:check": "biome check --formatter-enabled=false",
"lint:write": "biome check --formatter-enabled=false --write"
}(Optional) package.json Sort
Biome does not sort package.json keys. Replace the follow scripts to use the sort-package-json package for this functionality.
Install sort-package-json
pnpm add -D -E sort-package-jsonReplace Scripts
{
"format:check": "sort-package-json --check && biome format",
"format:write": "sort-package-json && biome format --write",
}or (optionally) in a monorepo:
{
"format:check": "sort-package-json \"package.json\" \"packages/*/package.json\" --check && biome format",
"format:write": "sort-package-json \"package.json\" \"packages/*/package.json\" && biome format --write",
}