@stkd/biome
v1.0.2
Published
Shared Biome configuration defaults for STKD projects
Readme
@stkd/biome
Shared Biome configuration defaults for STKD projects.
Installation
npm install @stkd/biome --save-devAdding Biome to a New Repository
Install dependencies:
npm install @stkd/biome @biomejs/biome --save-devCreate
biome.jsonin the project root:{ "$schema": "https://biomejs.dev/schemas/2.3.10/schema.json", "extends": ["@stkd/biome"], "files": { "includes": ["src/**/*.{js,jsx,ts,tsx}"] } }Add scripts to
package.json:"scripts": { "format": "biome format --write", "format-lint": "biome check --write", "lint": "biome lint --write" }Run formatting:
npm run format-lint
Usage
In your project's biome.json, extend this base configuration:
{
"$schema": "https://biomejs.dev/schemas/2.3.10/schema.json",
"extends": ["./node_modules/@stkd/biome/biome.json"],
"files": {
"includes": ["src/**/*.{js,jsx,ts,tsx}"]
}
}Base Configuration
The base config provides:
Formatter
- Indent style: tabs
- Line width: 120 characters
- Quote style: single quotes (JavaScript and CSS)
Linter Rules
recommended: enablednoUnusedImports: errornoUnusedVariables: erroruseParseIntRadix: offuseNodejsImportProtocol: offnoDoubleEquals: offnoGlobalIsNan: offuseLiteralKeys: offuseOptionalChain: offuseIterableCallbackReturn: offnoDocumentCookie: infonoDuplicateProperties: error
CSS Support
- Tailwind directives parsing enabled
noUnknownAtRulesignorestailwindandapply
Assists
organizeImports: onuseSortedKeys: onuseSortedProperties: on
Vue Support
Vue files have relaxed rules (no unused import/variable warnings) since SFC compilers handle these.
Repository Customization
Each repository should override:
files.includes
Define which files Biome should process:
"files": {
"includes": ["src/**/*.{js,jsx,ts,tsx}"]
}Releasing
This package uses GitHub Actions with npm Trusted Publishing for secure, secret-free publishing.
| Workflow | Purpose | | -------- | ---------------------------- | | Release | Patch, minor, or major bump |
To release:
- Go to the Actions tab in the GitHub repository
- Click Release
- Choose
patch,minor, ormajor - Click Run workflow
- The version will be bumped, published to npm, and changes pushed automatically
Trusted Publishing note:
- Configure npm to trust the exact workflow file you run:
release.yml - Keep Trusted Publishing pointed at this single workflow file
Schema Version
Base config uses: 2.3.10
When upgrading, update the $schema in both this base config and all projects that extend it.
