LogoNEXTDEVKIT Docs

Formatting and Linting

Code quality and consistency with Biome in NEXTDEVKIT

🌟 Why Biome?

FeatureBenefitPerformance
🚀 Fast PerformanceWritten in Rust for maximum speed10x faster than alternatives
🎯 All-in-OneCombines linting, formatting, and moreSingle tool, less complexity
🔧 Zero ConfigWorks out of the boxNo configuration needed
🛡️ Type SafetyDeep TypeScript integrationBetter error detection
🎨 Consistent StyleEnforces consistent code styleReduced code review time
📦 Small BundleMinimal dependenciesFaster CI/CD builds

📋 Available Scripts

NEXTDEVKIT provides several npm scripts for code quality management:

ScriptCommandPurpose
lintpnpm run lintCheck code quality without changes
lint:fixpnpm run lint:fixFix linting issues automatically
formatpnpm run formatFormat 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
// biome.json