Formatting and Linting
Code quality and consistency with Biome in NEXTDEVKIT
🌟 Why Biome?
Feature | Benefit | Performance |
---|---|---|
🚀 Fast Performance | Written in Rust for maximum speed | 10x faster than alternatives |
🎯 All-in-One | Combines linting, formatting, and more | Single tool, less complexity |
🔧 Zero Config | Works out of the box | No configuration needed |
🛡️ Type Safety | Deep TypeScript integration | Better error detection |
🎨 Consistent Style | Enforces consistent code style | Reduced code review time |
📦 Small Bundle | Minimal dependencies | Faster CI/CD builds |
📋 Available Scripts
NEXTDEVKIT provides several npm scripts for code quality management:
Script | Command | Purpose |
---|---|---|
lint | pnpm run lint | Check code quality without changes |
lint:fix | pnpm run lint:fix | Fix linting issues automatically |
format | pnpm run format | Format code according to style rules |
🔍 Running Linting & Formatting
Check Code Quality
To check your code without making changes:
# Using pnpm
pnpm run lint
This command will:
- 🔍 Report linting errors and warnings
- 📊 Display code style violations
- ⚠️ Show potential bugs and issues
- 📈 Provide performance suggestions
Fix Code Issues
To automatically fix linting issues:
# Using pnpm
pnpm run lint:fix
This command will:
- 🔧 Fix automatically fixable issues
- 📁 Organize imports
- 🎨 Apply consistent formatting
- 🔄 Remove unused variables
Format Code
To format your code according to project style:
# Using pnpm
pnpm run format
This command will:
- 🎨 Apply consistent formatting
- 📏 Enforce line length limits
- 🔤 Standardize quote styles
- 📐 Fix indentation
⚙️ Biome Configuration
The project's Biome configuration is defined in biome.json
at the project root:
// biome.json