adamantite 0.17.0 → 0.19.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,13 @@
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),
23
+ [tsgo](https://github.com/microsoft/typescript-go) and
24
+ [sherif](https://github.com/QuiiBz/sherif) that are designed to help humans and agents write
25
+ maintainable and scalable type-safe code, both for individual projects and monorepos.
26
+
24
27
  ---
25
28
 
26
29
  ## Quick Start
@@ -33,14 +36,24 @@ npx adamantite init
33
36
 
34
37
  Adamantite will automatically configure your project with linting, formatting, and type-safety rules.
35
38
 
39
+ ```shell
40
+ adamantite check # Check code for issues without fixing using oxlint
41
+ adamantite fix # Fix code issues using oxlint
42
+ adamantite format # Format code using oxfmt
43
+ adamantite typecheck # Run TypeScript type checking using the strict preset
44
+ adamantite monorepo # Check monorepo for dependency issues using Sherif
45
+ adamantite update # Update Adamantite's dependencies to the latest compatible versions
46
+ ```
47
+
36
48
  ## Features
37
49
 
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
50
+ - **⚡ Fast performance**: Built on oxc's Rust-based architecture for 10-40x faster linting than ESLint
51
+ - **🔍 Extensive linting**: 500+ rules covering correctness, performance, security, and accessibility
40
52
  - **🎯 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
53
+ - **🔧 Single tool solution**: Leverages the oxc ecosystem for linting and formatting
42
54
  - **🛡️ Strict type safety**: Comes with a strict TypeScript preset to improve type safety across your codebase
43
55
  - **🏗️ Monorepo support**: Unified configuration and dependency management across workspace packages
56
+ - **⚙️ CI-friendly**: Automatically configures GitHub Actions workflows to run checks in CI
44
57
  - **🤖 AI-friendly patterns**: Consistent code style designed for effective AI collaboration
45
58
 
46
59
  ## Installation
@@ -53,35 +66,19 @@ npx adamantite init
53
66
 
54
67
  This interactive command will:
55
68
 
56
- - Install Adamantite and [Biome](https://biomejs.dev/) as dev dependencies
57
- - Create `biome.jsonc` with opinionated presets
69
+ - Install Adamantite, [oxlint](https://oxc.rs/docs/guide/usage/linter.html), and [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) as dev dependencies
70
+ - Create `.oxlintrc.json` with opinionated presets
71
+ - Create `.oxfmtrc.json` with formatting configuration
58
72
  - Set up `tsconfig.json` with strict TypeScript rules
59
73
  - 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
- ```
74
+ - Also adds monorepo-specific scripts if running a monorepo
75
+ - Configure editor settings
77
76
 
78
77
  ## 📋 Commands
79
78
 
80
- Adamantite provides a comprehensive CLI for all your code quality needs:
81
-
82
79
  ### `adamantite check`
83
80
 
84
- Check your code for issues without automatically fixing them:
81
+ Check your code for issues without automatically fixing them using oxlint:
85
82
 
86
83
  ```shell
87
84
  # Check all files
@@ -89,9 +86,6 @@ adamantite check
89
86
 
90
87
  # Check specific files
91
88
  adamantite check src/components/**/*.ts
92
-
93
- # Show summary of results
94
- adamantite check --summary
95
89
  ```
96
90
 
97
91
  ### `adamantite fix`
@@ -105,23 +99,29 @@ adamantite fix
105
99
  # Fix specific files
106
100
  adamantite fix src/utils.ts
107
101
 
108
- # Apply unsafe fixes
109
- adamantite fix --unsafe
102
+ # Apply suggested fixes
103
+ adamantite fix --suggested
104
+
105
+ # Apply dangerous fixes
106
+ adamantite fix --dangerous
107
+
108
+ # Apply all fixes
109
+ adamantite fix --all
110
110
  ```
111
111
 
112
- ### `adamantite ci`
112
+ ### `adamantite format`
113
113
 
114
- Run in continuous integration environments:
114
+ Format your code using oxfmt:
115
115
 
116
116
  ```shell
117
- # Basic CI check
118
- adamantite ci
117
+ # Format all files
118
+ adamantite format
119
119
 
120
- # With GitHub reporter (for PR comments)
121
- adamantite ci --github
120
+ # Format specific files
121
+ adamantite format src/utils.ts
122
122
 
123
- # Include monorepo checks
124
- adamantite ci --monorepo
123
+ # Check if files are formatted without writing
124
+ adamantite format --check
125
125
  ```
126
126
 
127
127
  ### `adamantite monorepo`
@@ -143,6 +143,18 @@ Automatically detects and fixes:
143
143
  - Unused dependencies
144
144
  - Package.json formatting issues
145
145
 
146
+ ### `adamantite typecheck`
147
+
148
+ Run TypeScript type checking using tsgo (TypeScript Go) and the strict preset:
149
+
150
+ ```shell
151
+ # Type check all files
152
+ adamantite typecheck
153
+
154
+ # Type check specific files
155
+ adamantite typecheck src/utils.ts
156
+ ```
157
+
146
158
  ### `adamantite update`
147
159
 
148
160
  Keep your dependencies current:
@@ -154,38 +166,40 @@ adamantite update
154
166
 
155
167
  ## Presets
156
168
 
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
- ```
169
+ ### Linting ([presets/oxlint/](./presets/oxlint/))
170
+
171
+ Adamantite provides comprehensive linting rules for TypeScript and JavaScript:
172
+
173
+ #### Core ([core.json](./presets/oxlint/core.json))
174
+
175
+ Extensive ruleset covering:
176
+
177
+ - **Correctness**: Bug prevention and code correctness enforcement
178
+ - **Performance**: Optimization patterns and performance best practices
179
+ - **Restriction**: Enforcing coding standards and preventing problematic patterns
180
+ - **Suspicious**: Detecting code smells and potential bugs
181
+ - **Pedantic**: Strict code quality and consistency enforcement
182
+ - **Style**: Consistent code formatting and naming conventions
183
+ - **Nursery**: Experimental rules under active development
184
+
185
+ #### Framework Presets
186
+
187
+ Framework-specific presets are available for:
188
+
189
+ - **React** ([react.json](./presets/oxlint/react.json)) - React, React-perf, and JSX-a11y rules
190
+ - **Next.js** ([nextjs.json](./presets/oxlint/nextjs.json)) - Next.js-specific rules
191
+ - **Vue** ([vue.json](./presets/oxlint/vue.json)) - Vue.js rules
192
+ - **Node.js** ([node.json](./presets/oxlint/node.json)) - Node.js-specific rules
193
+ - **Jest** ([jest.json](./presets/oxlint/jest.json)) - Jest testing rules
194
+ - **Vitest** ([vitest.json](./presets/oxlint/vitest.json)) - Vitest testing rules
195
+
196
+ ### Formatting ([presets/oxfmt.json](./presets/oxfmt.json))
197
+
198
+ Opinionated code formatting with oxfmt, configured for consistency and readability. Includes automatic import sorting and organization.
199
+
200
+ ### TypeScript ([presets/tsconfig.json](./presets/tsconfig.json))
187
201
 
188
- These settings catch errors at compile-time that would otherwise cause runtime failures.
202
+ Strict TypeScript configuration for maximum type safety. Catches errors at compile-time that would otherwise cause runtime failures.
189
203
 
190
204
  ## 🛠️ Development
191
205