Skip to content

πŸ’  Linting, formatting, and type-safety presets for modern TypeScript applications.

License

Notifications You must be signed in to change notification settings

adelrodriguez/adamantite

Repository files navigation

πŸ’  Adamantite

Bulletproof your code.

Opinionated linting, formatting, and type-safety presets for modern TypeScript applications.
Designed for humans and AI.

npm version npm downloads license


Quick Start

Run the following command on your project to get started:

npx adamantite init

Adamantite will automatically configure your project with linting, formatting, and type-safety rules.

Features

  • ⚑ Fast performance: Built on Biome's Rust-based architecture for efficient linting and formatting
  • πŸ” Extensive linting: 200+ rules covering correctness, performance, security, and accessibility
  • 🎯 Zero configuration: Works out of the box with sensible defaults, no setup required
  • πŸ”§ Single tool solution: Replaces ESLint + Prettier + multiple config files with one unified approach
  • πŸ›‘οΈ Strict type safety: Comes with a strict TypeScript preset to improve type safety across your codebase
  • πŸ—οΈ Monorepo support: Unified configuration and dependency management across workspace packages
  • πŸ€– AI-friendly patterns: Consistent code style designed for effective AI collaboration

Installation

Automatic Setup (Recommended)

npx adamantite init

This interactive command will:

  • Install Adamantite and Biome as dev dependencies
  • Create biome.jsonc with opinionated presets
  • Set up tsconfig.json with strict TypeScript rules
  • Add lint/format scripts to your package.json
  • Configure editor settings (VSCode/Cursor/Windsurf)
  • Install Sherif for monorepo support

Manual Setup

If you prefer manual configuration:

# Install dependencies
npm install --save-dev adamantite @biomejs/biome

# Extend the Biome configuration
echo '{ "extends": ["adamantite"] }' > biome.jsonc

# Extend TypeScript configuration
echo '{ "extends": "adamantite/presets/tsconfig.json" }' > tsconfig.json

πŸ“‹ Commands

Adamantite provides a comprehensive CLI for all your code quality needs:

adamantite check

Check your code for issues without automatically fixing them:

# Check all files
adamantite check

# Check specific files
adamantite check src/components/**/*.ts

# Show summary of results
adamantite check --summary

adamantite fix

Fix issues in your code with automatic formatting and safe fixes:

# Fix all files
adamantite fix

# Fix specific files
adamantite fix src/utils.ts

# Apply unsafe fixes
adamantite fix --unsafe

adamantite ci

Run in continuous integration environments:

# Basic CI check
adamantite ci

# With GitHub reporter (for PR comments)
adamantite ci --github

# Include monorepo checks
adamantite ci --monorepo

adamantite monorepo

Special tooling for monorepo projects using Sherif:

# Lint and fix monorepo-specific issues
adamantite monorepo

Automatically detects and fixes:

  • Inconsistent dependency versions across packages
  • Missing dependencies in package.json
  • Unused dependencies
  • Package.json formatting issues

adamantite update

Keep your dependencies current:

# Update to latest compatible versions
adamantite update

Presets

Biome Configuration (biome.jsonc)

Adamantite's Biome preset includes:

  • Formatting: 2-space indentation, 80-character line width, LF line endings
  • Import Organization: Automatic import sorting with custom groups (Bun β†’ Node β†’ Packages β†’ Aliases)
  • Linting Rules: 200+ rules covering:
    • Code correctness and bug prevention
    • Performance optimizations
    • Security best practices
    • Accessibility guidelines
    • React/JSX patterns
  • File Patterns: Pre-configured for TypeScript, JavaScript, JSON, and more

TypeScript Configuration (presets/tsconfig.json)

The TypeScript preset includes strict settings for maximum type safety:

{
  "compilerOptions": {
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "noImplicitOverride": true,
    "forceConsistentCasingInFileNames": true,
    "noImplicitReturns": true,
    "verbatimModuleSyntax": true
  }
}

These settings catch errors at compile-time that would otherwise cause runtime failures.

πŸ› οΈ Development

This project uses Bun for all development tasks:

# Install dependencies
bun install

# Run tests
bun test

# Build CLI
bun run build

# Type checking
bun run typecheck

🀝 Contributing

Contributions are welcome! Please read our contributing guidelines first.

πŸ“„ License

MIT Β© Adel Rodriguez

About

πŸ’  Linting, formatting, and type-safety presets for modern TypeScript applications.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •