Formatting & Linting
Guide to using Biome for code quality
Dirstarter uses Biome for code formatting and linting to ensure consistent code quality across the project.
Biome is configured in the project root with biome.json
. This configuration enforces consistent code style and catches common errors.
Key Features
- Zero-config: Works out of the box with sensible defaults
- Fast: Written in Rust for maximum performance
- All-in-one: Combines linting, formatting, and more in a single tool
Running Linting & Formatting
Check Code Quality
To check your code without making changes:
This command will report any linting errors or warnings in your codebase.
Format Code
To automatically format your code:
This will format all supported files according to the project's style rules.
Editor Integration
Biome works best when integrated with your editor:
- VSCode/Cursor: Install the Biome extension for real-time linting and formatting
- Other Editors: Check the Biome documentation for integration options
Customizing Rules
The project's Biome configuration is defined in biome.json
. If you need to modify the rules follow the Biome documentation.
TypeScript Integration
Biome works alongside TypeScript to provide comprehensive code quality checks:
- TypeScript handles type checking
- Biome handles style and common errors
- Together they provide a robust development experience
Next Steps
Now that you understand how code quality is maintained, learn about updating the codebase to stay current with the latest improvements.
Last updated on