Opinionated linting, formatting, type-safety and code quality presets for modern TypeScript applications.
Adamantite is a collection of presets for oxlint, oxfmt, tsgo 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 without fixing using oxlint
adamantite fix # Fix code issues using oxlint
adamantite format # Format code using oxfmt
adamantite typecheck # Run TypeScript type checking using the strict preset
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
.oxlintrc.jsonwith opinionated presets - Create
.oxfmtrc.jsonwith 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 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/utils.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/utils.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 TypeScript type checking using tsgo (TypeScript Go) and the strict preset:
# Type check all files
adamantite typecheck
# Type check specific files
adamantite typecheck src/utils.tsKeep your dependencies current:
# Update to latest compatible versions
adamantite updateLinting (presets/oxlint/)
Adamantite provides comprehensive linting rules for TypeScript and JavaScript:
Core (core.json)
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.json) - React, React-perf, and JSX-a11y rules
- Next.js (nextjs.json) - Next.js-specific rules
- Vue (vue.json) - Vue.js rules
- Node.js (node.json) - Node.js-specific rules
- Jest (jest.json) - Jest testing rules
- Vitest (vitest.json) - Vitest testing rules
Formatting (presets/oxfmt.json)
Opinionated code formatting with oxfmt, configured for consistency and readability. Includes automatic import sorting and organization.
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
# Type checking
bun run typecheckContributions are welcome! Please read our contributing guidelines first.
MIT Β© Adel Rodriguez