adamantite 0.16.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,11 +1,7 @@
1
1
  <p align="center">
2
2
  <h1 align="center">💠 Adamantite</h1>
3
3
  <p align="center">
4
- <em><strong>Bulletproof your code.</strong></em>
5
- </p>
6
- <p align="center">
7
- Opinionated linting, formatting, and type-safety presets for modern TypeScript applications.<br>
8
- Designed for humans and AI.
4
+ <strong>Opinionated linting, formatting, type-safety and code quality presets for modern TypeScript applications.</strong>
9
5
  </p>
10
6
  </p>
11
7
 
@@ -21,6 +17,12 @@
21
17
  </a>
22
18
  </p>
23
19
 
20
+ Adamantite is a collection of presets for
21
+ [oxlint](https://oxc.rs/docs/guide/usage/linter.html),
22
+ [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) and
23
+ [sherif](https://github.com/QuiiBz/sherif) that are designed to help humans and agents write
24
+ maintainable and scalable type-safe code, both for individual projects and monorepos.
25
+
24
26
  ---
25
27
 
26
28
  ## Quick Start
@@ -33,14 +35,24 @@ npx adamantite init
33
35
 
34
36
  Adamantite will automatically configure your project with linting, formatting, and type-safety rules.
35
37
 
38
+ ```shell
39
+ adamantite check # Check code for issues without fixing using oxlint
40
+ adamantite fix # Fix code issues using oxlint
41
+ adamantite format # Format code using oxfmt
42
+ adamantite typecheck # Run TypeScript type checking using the strict preset
43
+ adamantite monorepo # Check monorepo for dependency issues using Sherif
44
+ adamantite update # Update Adamantite's dependencies to the latest compatible versions
45
+ ```
46
+
36
47
  ## Features
37
48
 
38
- - **⚡ Fast performance**: Built on Biome's Rust-based architecture for efficient linting and formatting
39
- - **🔍 Extensive linting**: 200+ rules covering correctness, performance, security, and accessibility
49
+ - **⚡ Fast performance**: Built on oxc's Rust-based architecture for 10-40x faster linting than ESLint
50
+ - **🔍 Extensive linting**: 500+ rules covering correctness, performance, security, and accessibility
40
51
  - **🎯 Zero configuration**: Works out of the box with sensible defaults, no setup required
41
- - **🔧 Single tool solution**: Replaces ESLint + Prettier + multiple config files with one unified approach
52
+ - **🔧 Single tool solution**: Leverages the oxc ecosystem for linting and formatting
42
53
  - **🛡️ Strict type safety**: Comes with a strict TypeScript preset to improve type safety across your codebase
43
54
  - **🏗️ Monorepo support**: Unified configuration and dependency management across workspace packages
55
+ - **⚙️ CI-friendly**: Automatically configures GitHub Actions workflows to run checks in CI
44
56
  - **🤖 AI-friendly patterns**: Consistent code style designed for effective AI collaboration
45
57
 
46
58
  ## Installation
@@ -53,35 +65,19 @@ npx adamantite init
53
65
 
54
66
  This interactive command will:
55
67
 
56
- - Install Adamantite and [Biome](https://biomejs.dev/) as dev dependencies
57
- - Create `biome.jsonc` with opinionated presets
68
+ - Install Adamantite, [oxlint](https://oxc.rs/docs/guide/usage/linter.html), and [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) as dev dependencies
69
+ - Create `.oxlintrc.json` with opinionated presets
70
+ - Create `.oxfmtrc.json` with formatting configuration
58
71
  - Set up `tsconfig.json` with strict TypeScript rules
59
72
  - Add lint/format scripts to your `package.json`
60
- - Configure editor settings (VSCode/Cursor/Windsurf)
61
- - Install [Sherif](https://github.com/QuiiBz/sherif) for monorepo support
62
-
63
- ### Manual Setup
64
-
65
- If you prefer manual configuration:
66
-
67
- ```shell
68
- # Install dependencies
69
- npm install --save-dev adamantite @biomejs/biome
70
-
71
- # Extend the Biome configuration
72
- echo '{ "extends": ["adamantite"] }' > biome.jsonc
73
-
74
- # Extend TypeScript configuration
75
- echo '{ "extends": "adamantite/typescript" }' > tsconfig.json
76
- ```
73
+ - Also adds monorepo-specific scripts if running a monorepo
74
+ - Configure editor settings
77
75
 
78
76
  ## 📋 Commands
79
77
 
80
- Adamantite provides a comprehensive CLI for all your code quality needs:
81
-
82
78
  ### `adamantite check`
83
79
 
84
- Check your code for issues without automatically fixing them:
80
+ Check your code for issues without automatically fixing them using oxlint:
85
81
 
86
82
  ```shell
87
83
  # Check all files
@@ -89,9 +85,6 @@ adamantite check
89
85
 
90
86
  # Check specific files
91
87
  adamantite check src/components/**/*.ts
92
-
93
- # Show summary of results
94
- adamantite check --summary
95
88
  ```
96
89
 
97
90
  ### `adamantite fix`
@@ -105,23 +98,29 @@ adamantite fix
105
98
  # Fix specific files
106
99
  adamantite fix src/utils.ts
107
100
 
108
- # Apply unsafe fixes
109
- adamantite fix --unsafe
101
+ # Apply suggested fixes
102
+ adamantite fix --suggested
103
+
104
+ # Apply dangerous fixes
105
+ adamantite fix --dangerous
106
+
107
+ # Apply all fixes
108
+ adamantite fix --all
110
109
  ```
111
110
 
112
- ### `adamantite ci`
111
+ ### `adamantite format`
113
112
 
114
- Run in continuous integration environments:
113
+ Format your code using oxfmt:
115
114
 
116
115
  ```shell
117
- # Basic CI check
118
- adamantite ci
116
+ # Format all files
117
+ adamantite format
119
118
 
120
- # With GitHub reporter (for PR comments)
121
- adamantite ci --github
119
+ # Format specific files
120
+ adamantite format src/utils.ts
122
121
 
123
- # Include monorepo checks
124
- adamantite ci --monorepo
122
+ # Check if files are formatted without writing
123
+ adamantite format --check
125
124
  ```
126
125
 
127
126
  ### `adamantite monorepo`
@@ -143,6 +142,18 @@ Automatically detects and fixes:
143
142
  - Unused dependencies
144
143
  - Package.json formatting issues
145
144
 
145
+ ### `adamantite typecheck`
146
+
147
+ Run TypeScript type checking using the strict preset:
148
+
149
+ ```shell
150
+ # Type check all files
151
+ adamantite typecheck
152
+
153
+ # Type check specific files
154
+ adamantite typecheck src/utils.ts
155
+ ```
156
+
146
157
  ### `adamantite update`
147
158
 
148
159
  Keep your dependencies current:
@@ -154,38 +165,29 @@ adamantite update
154
165
 
155
166
  ## Presets
156
167
 
157
- ### Biome Configuration ([biome.jsonc](./biome.jsonc))
158
-
159
- Adamantite's Biome preset includes:
160
-
161
- - **Formatting**: 2-space indentation, 80-character line width, LF line endings
162
- - **Import Organization**: Automatic import sorting with custom groups (Bun → Node → Packages → Aliases)
163
- - **Linting Rules**: 200+ rules covering:
164
- - Code correctness and bug prevention
165
- - Performance optimizations
166
- - Security best practices
167
- - Accessibility guidelines
168
- - React/JSX patterns
169
- - **File Patterns**: Pre-configured for TypeScript, JavaScript, JSON, and more
170
-
171
- ### TypeScript Configuration ([presets/tsconfig.json](./presets/tsconfig.json))
172
-
173
- The TypeScript preset includes strict settings for maximum type safety:
174
-
175
- ```json
176
- {
177
- "compilerOptions": {
178
- "strict": true,
179
- "noUncheckedIndexedAccess": true,
180
- "noImplicitOverride": true,
181
- "forceConsistentCasingInFileNames": true,
182
- "noImplicitReturns": true,
183
- "verbatimModuleSyntax": true
184
- }
185
- }
186
- ```
168
+ ### Linting ([presets/oxlint/](./presets/oxlint/))
169
+
170
+ Adamantite provides comprehensive linting rules for TypeScript and JavaScript:
171
+
172
+ #### Core ([core.json](./presets/oxlint/core.json))
173
+
174
+ Extensive ruleset covering:
175
+
176
+ - **Correctness**: Bug prevention and code correctness enforcement
177
+ - **Performance**: Optimization patterns and performance best practices
178
+ - **Restriction**: Enforcing coding standards and preventing problematic patterns
179
+ - **Suspicious**: Detecting code smells and potential bugs
180
+ - **Pedantic**: Strict code quality and consistency enforcement
181
+ - **Style**: Consistent code formatting and naming conventions
182
+ - **Nursery**: Experimental rules under active development
183
+
184
+ ### Formatting ([presets/oxfmt.json](./presets/oxfmt.json))
185
+
186
+ Opinionated code formatting with oxfmt, configured for consistency and readability. Includes automatic import sorting and organization.
187
+
188
+ ### TypeScript ([presets/tsconfig.json](./presets/tsconfig.json))
187
189
 
188
- These settings catch errors at compile-time that would otherwise cause runtime failures.
190
+ Strict TypeScript configuration for maximum type safety. Catches errors at compile-time that would otherwise cause runtime failures.
189
191
 
190
192
  ## 🛠️ Development
191
193