Opinionated linting, formatting, type-safety and code quality presets for modern TypeScript applications.
Adamantite is a collection of presets for oxlint, oxfmt, TypeScript and sherif that are designed to help humans and agents write maintainable and scalable type-safe code, both for individual projects and monorepos.
Run the following command on your project to get started:
npx adamantite initAdamantite will automatically configure your project with linting, formatting, and type-safety rules.
adamantite check # Check code for issues and type errors using oxlint
adamantite fix # Fix code issues using oxlint
adamantite format # Format code using oxfmt
adamantite monorepo # Check monorepo for dependency issues using Sherif
adamantite update # Update Adamantite's dependencies to the latest compatible versions- β‘ Fast performance: Built on oxc's Rust-based architecture for 10-40x faster linting than ESLint
- π Extensive linting: 500+ rules covering correctness, performance, security, and accessibility
- π― Zero configuration: Works out of the box with sensible defaults, no setup required
- π§ Single tool solution: Leverages the oxc ecosystem for linting and formatting
- π‘οΈ 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
- βοΈ CI-friendly: Automatically configures GitHub Actions workflows to run checks in CI
- π€ AI-friendly patterns: Consistent code style designed for effective AI collaboration
npx adamantite initThis interactive command will:
- Install Adamantite, oxlint, and oxfmt as dev dependencies
- Create
oxlint.config.tswith opinionated presets - Create
oxfmt.config.tswith formatting configuration - Set up
tsconfig.jsonwith strict TypeScript rules - Add lint/format scripts to your
package.json- Also adds monorepo-specific scripts if running a monorepo
- Configure editor settings
Check your code for issues and type errors without automatically fixing them using oxlint:
# Check all files
adamantite check
# Check specific files
adamantite check src/components/**/*.tsFix issues in your code with automatic formatting and safe fixes:
# Fix all files
adamantite fix
# Fix specific files
adamantite fix src/index.ts
# Apply suggested fixes
adamantite fix --suggested
# Apply dangerous fixes
adamantite fix --dangerous
# Apply all fixes
adamantite fix --allFormat your code using oxfmt:
# Format all files
adamantite format
# Format specific files
adamantite format src/index.ts
# Check if files are formatted without writing
adamantite format --checkSpecial tooling for monorepo projects using Sherif:
# Check for monorepo-specific issues
adamantite monorepo
# Fix monorepo-specific issues
adamantite monorepo --fixAutomatically detects and fixes:
- Inconsistent dependency versions across packages
- Missing dependencies in package.json
- Unused dependencies
- Package.json formatting issues
Run applicable migrations and update Adamantite-managed dependencies:
# Run migrations and update managed dependencies
adamantite updateThis also migrates legacy .oxfmtrc.json(c) configs to oxfmt.config.ts and knip.json(c) configs to knip.config.ts.
Linting (presets/lint/)
Adamantite provides comprehensive linting rules for TypeScript and JavaScript:
Core (core.ts)
Extensive ruleset covering:
- Correctness: Bug prevention and code correctness enforcement
- Performance: Optimization patterns and performance best practices
- Restriction: Enforcing coding standards and preventing problematic patterns
- Suspicious: Detecting code smells and potential bugs
- Pedantic: Strict code quality and consistency enforcement
- Style: Consistent code formatting and naming conventions
- Nursery: Experimental rules under active development
Framework-specific presets are available for:
- React (react.ts) - React, React-perf, and JSX-a11y rules
- Next.js (nextjs.ts) - Next.js-specific rules
- Vue (vue.ts) - Vue.js rules
- Node.js (node.ts) - Node.js-specific rules
- Jest (jest.ts) - Jest testing rules
- Vitest (vitest.ts) - Vitest testing rules
Formatting (format.ts)
Opinionated code formatting with oxfmt, configured for consistency and readability. The published formatter preset is available as adamantite/format and is designed to be used from oxfmt.config.ts.
Analyze (analyze.ts)
Opinionated Knip configuration for dependency and unused-file analysis. The published analyze preset is available as adamantite/analyze and is designed to be used from knip.config.ts.
TypeScript (presets/tsconfig.json)
Strict TypeScript configuration for maximum type safety. Catches errors at compile-time that would otherwise cause runtime failures.
This project uses Bun for all development tasks:
# Install dependencies
bun install
# Run tests
bun test
# Build CLI
bun run build
# Linting and type checking
bun run checkContributions are welcome! Please read our contributing guidelines first.
MIT Β© Adel Rodriguez