Skip to content

Commit b7ad040

Browse files
Update README.md with biome config usage instructions (#50)
2 parents d5b9f52 + 35d8147 commit b7ad040

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

README.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,57 @@ const config = {
171171
module.exports = config;
172172
```
173173

174+
## Biome Configuration
175+
176+
`@technance/code-style` provides a [Biome](https://biomejs.dev/) configuration for ultra-fast linting and formatting. Biome is a performant alternative to ESLint and Prettier, written in Rust.
177+
178+
### Installation
179+
180+
First, install Biome as a development dependency:
181+
182+
```bash
183+
pnpm add @biomejs/biome -D
184+
```
185+
186+
```bash
187+
npm install --save-dev @biomejs/biome
188+
```
189+
190+
```bash
191+
yarn add -D @biomejs/biome
192+
```
193+
194+
### Setup
195+
196+
Create a `biome.json` or `biome.jsonc` file in your project root that extends the shared configuration:
197+
198+
```json
199+
{
200+
"extends": ["@technance/code-style/biome"],
201+
"linter": {
202+
"enabled": true
203+
},
204+
"formatter": {
205+
"enabled": true
206+
}
207+
}
208+
```
209+
210+
### Configuration Details
211+
212+
The shared Biome configuration includes:
213+
214+
- **Formatter**: 4-space indentation, double quotes, 130 character line width
215+
- **Linter**: Enabled with recommended rules for React and general projects
216+
- **Import Organization**: Automatic import sorting with logical grouping
217+
- **Test Files**: Linting disabled for test files (`.test.ts`, `.spec.ts`, etc.)
218+
- **VCS Integration**: Git-aware with `.gitignore` support
219+
220+
You can override any of these settings in your local `biome.json` file as needed.
221+
174222
## Customization
175223

176-
You can further customize both ESLint and Prettier configurations by merging or overriding specific rules. This flexibility allows you to adhere to your coding conventions while benefiting from the solid defaults provided by `@technance/code-style`.
224+
You can further customize ESLint, Prettier, and Biome configurations by merging or overriding specific rules. This flexibility allows you to adhere to your coding conventions while benefiting from the solid defaults provided by `@technance/code-style`.
177225

178226
## License
179227

0 commit comments

Comments
 (0)