@sbuxdw/lintpresso
v1.0.11
Published
A shareable Biome.js configuration for consistent code formatting and linting across projects.
Downloads
16
Maintainers
Readme
@sbuxdw/lintpresso
A shareable Biome.js configuration for consistent code formatting and linting across PCC projects.
Features
- 🚀 Zero configuration - Works out of the box
- 🎯 Comprehensive rules - Covers JavaScript, TypeScript, JSON, and CSS
- 🔧 Customizable - Easily extend or override rules
- 📦 Lightweight - No unnecessary dependencies
- 🎨 Consistent formatting - Standardized code style across projects
- 🛡️ Security focused - Includes security-related linting rules
- ♿ Accessibility - A11y rules included by default
Installation
# Using npm
npm install --save-dev @sbuxdw/lintpresso @biomejs/biome
# Using yarn
yarn add --dev @sbuxdw/lintpresso @biomejs/biome
# Using pnpm
pnpm add --save-dev @sbuxdw/lintpresso @biomejs/biomeUsage
Use the configuration directly
Create a biome.json file in your project root:
{
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
"extends": ["@sbuxdw/lintpresso/biome.json"]
}🌱 Why Migrate from ESLint to Biome?
Biome is a modern, integrated developer toolchain designed to replace traditional linting and formatting tools like ESLint. Here are several compelling reasons to consider migrating:
🚀 1. Unified Tooling
Biome combines linting, formatting, type checking, and more into a single cohesive system.
- ✅ No need to configure and maintain multiple tools (e.g., ESLint, Prettier, TypeScript).
- ✅ Reduces configuration complexity and toolchain fragmentation.
- ✅ Ensures consistent behavior across all aspects of code analysis.
⚡ 2. Performance
Biome is built with performance in mind.
- ⚡ Faster than ESLint due to optimized architecture and parallel processing.
- ⚡ Minimal startup time and faster feedback loops during development.
🧠 3. Built-in Type Awareness
Biome deeply integrates with TypeScript and understands types out of the box.
- 🧠 No need for separate type-aware ESLint plugins.
- 🧠 Enables smarter linting rules based on actual type information.
🛠️ 4. Zero Config Philosophy
Biome works out of the box with sensible defaults.
- 🛠️ Reduces time spent on configuration and rule tuning.
- 🛠️ Encourages consistency across teams and projects.
🔄 5. Automatic Fixes and Formatting
Biome includes built-in formatting and auto-fix capabilities.
- 🔄 Eliminates the need for Prettier or separate formatters.
- 🔄 Ensures formatting and linting are always in sync.
📦 6. Modern Architecture
Biome is designed for modern development workflows.
- 📦 Written in Rust for speed and safety.
- 📦 Supports monorepos and large-scale codebases natively.
👥 7. Better Developer Experience
Biome improves the day-to-day experience for developers.
- 👥 Clearer error messages and diagnostics.
- 👥 Seamless integration with editors and CI/CD pipelines.
🔒 8. Security and Reliability
Biome avoids the plugin ecosystem pitfalls of ESLint.
- 🔒 No risk of malicious or poorly maintained plugins.
- 🔒 More predictable and secure behavior.
📈 9. Future-Proof
Biome is actively developed with a forward-looking vision.
- 📈 Designed to evolve with modern JavaScript/TypeScript standards.
- 📈 Community-driven with strong momentum.
✅ Summary
| Feature | ESLint | Biomes | |----------------------|---------------|---------------| | Performance | Moderate | High | | Type Awareness | Plugin-based | Built-in | | Configuration | Complex | Minimal | | Formatting | External tool | Built-in | | Security | Plugin risks | Safer | | Developer Experience | Good | Excellent |
Configuration Details
This configuration includes:
Formatter Settings
- Indent: 2 spaces
- Line width: 100 characters
- Line endings: LF (Unix-style)
- Quotes: Single quotes for JavaScript, double quotes for JSX
- Semicolons: Always required
- Trailing commas: ES5 compatible
Linter Rules
- Recommended rules: Enabled by default
- Accessibility: A11y rules for better accessibility
- Security: Security-focused rules to prevent common vulnerabilities
- Style: Consistent code style enforcement
- Complexity: Rules to manage code complexity
- Suspicious: Rules to catch potential bugs and issues
File Support
- JavaScript (
.js,.jsx) - TypeScript (
.ts,.tsx) - JSON (
.json,.jsonc) - Vue (
.vue) - Svelte (
.svelte) - CSS (
.css)
Ignored Patterns
node_modules/dist/,build/.next/,.nuxt/- Coverage reports
- Generated files and vendor directories
Scripts
Add these scripts to your package.json:
{
"scripts": {
"lint": "biome check .",
"lint:fix": "biome check --apply .",
"format": "biome format --write ."
}
}Customization
You can override any configuration by extending the base config:
{
"extends": ["@sbuxdw/lintpresso"],
"formatter": {
"lineWidth": 120
},
"linter": {
"rules": {
"style": {
"noVar": "off"
}
}
}
}VSCode Integration
Install the Biome extension for VSCode and add this to your .vscode/settings.json:
{
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
}
}CI/CD Integration
GitHub Actions
name: Code Quality
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- run: npm ci
- run: npm run lintAPI Reference
config
The complete Biome configuration object.
configPath
Path to the Biome configuration file.
createConfig(customizations)
Create a customized configuration by deep merging with the base config.
Parameters:
customizations(optional): Partial Biome configuration to merge
Returns: Complete Biome configuration object
loadBiomeConfig()
Load the Biome configuration from file.
getBiomeConfigPath()
Get the absolute path to the Biome configuration file.
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes and test them
- Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin feature/my-feature - Submit a pull request
License
MIT © PCC Team
Changelog
1.0.0
- Initial release with comprehensive Biome.js configuration
- Support for JavaScript, TypeScript, JSON, and CSS
- Programmatic API for configuration customization
- TypeScript definitions included
