@next-vibe/checker 1.0.21 → 1.0.23
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/.dist/README.md +264 -331
- package/.dist/bin/vibe-runtime.js +4710 -3981
- package/.dist/bin/vibe-runtime.js.map +41 -35
- package/README.md +264 -331
- package/check.config.ts +1 -1
- package/package.json +4 -3
- package/src/app/api/[locale]/system/check/config/create/definition.ts +282 -0
- package/src/app/api/[locale]/system/check/config/create/i18n/de/index.ts +151 -0
- package/src/app/api/[locale]/system/check/config/create/i18n/en/index.ts +151 -0
- package/src/app/api/[locale]/system/check/config/create/i18n/pl/index.ts +148 -0
- package/src/app/api/[locale]/system/check/config/create/repository.ts +281 -0
- package/src/app/api/[locale]/system/check/config/create/route.ts +21 -0
- package/src/app/api/[locale]/system/check/config/repository.ts +1 -11
- package/src/app/api/[locale]/system/check/i18n/de/index.ts +4 -0
- package/src/app/api/[locale]/system/check/i18n/en/index.ts +4 -0
- package/src/app/api/[locale]/system/check/i18n/pl/index.ts +4 -0
- package/src/app/api/[locale]/system/check/lint/definition.ts +0 -12
- package/src/app/api/[locale]/system/check/lint/repository.ts +2 -2
- package/src/app/api/[locale]/system/check/oxlint/definition.ts +0 -12
- package/src/app/api/[locale]/system/check/oxlint/repository.ts +2 -2
- package/src/app/api/[locale]/system/check/test-project/.vscode/settings.json +48 -0
- package/src/app/api/[locale]/system/check/test-project/check.config.ts +1 -1
- package/src/app/api/[locale]/system/check/test-project/package.json +1 -0
- package/src/app/api/[locale]/system/check/test-project/src/test-issues/eslint-issues.tsx +1 -1
- package/src/app/api/[locale]/system/check/test-project/src/test-issues/react-issues.tsx +1 -1
- package/src/app/api/[locale]/system/check/test-project/tsconfig.tsbuildinfo +1 -1
- package/src/app/api/[locale]/system/check/typecheck/definition.ts +0 -12
- package/src/app/api/[locale]/system/check/typecheck/repository.ts +1 -1
- package/src/app/api/[locale]/system/check/vibe-check/definition.ts +0 -13
- package/src/app/api/[locale]/system/check/vibe-check/i18n/de/index.ts +1 -1
- package/src/app/api/[locale]/system/check/vibe-check/i18n/en/index.ts +1 -1
- package/src/app/api/[locale]/system/check/vibe-check/i18n/pl/index.ts +1 -1
- package/src/app/api/[locale]/system/check/vibe-check/repository.ts +10 -11
- package/src/app/api/[locale]/system/generated/endpoint.ts +12 -2
- package/src/app/api/[locale]/system/generated/endpoints.ts +22 -16
- package/src/app/api/[locale]/system/generated/route-handlers.ts +10 -2
- package/src/app/api/[locale]/system/help/list/repository.ts +4 -3
- package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/grouped-list.ts +5 -1
- package/src/app/api/[locale]/system/unified-interface/mcp/converter.ts +4 -3
package/.dist/README.md
CHANGED
|
@@ -1,283 +1,208 @@
|
|
|
1
|
-
# vibe
|
|
1
|
+
# @next-vibe/checker
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Comprehensive TypeScript code quality checker combining Oxlint, ESLint, and TypeScript
|
|
4
4
|
|
|
5
5
|
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
6
|
-
[](https://www.npmjs.com/package/vibe-check)
|
|
7
6
|
[](https://nodejs.org)
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
Run parallel code quality checks (Oxlint + ESLint + TypeScript) with auto-fix enabled by default. Built with Rust-powered Oxlint for maximum performance.
|
|
10
9
|
|
|
11
10
|
## Features
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
- **Parallel execution** - All checks run simultaneously
|
|
13
|
+
- **Smart caching** - Dramatically faster on subsequent runs
|
|
14
|
+
- **Auto-fix** - Automatically fixes issues (enabled by default)
|
|
15
|
+
- **100+ rules** - React, TypeScript, a11y, Next.js, Node.js
|
|
16
|
+
- **Custom plugins** - i18n validation, JSX capitalization, restricted syntax
|
|
17
|
+
- **MCP server** - Expose tools via Model Context Protocol
|
|
18
|
+
- **Fast type checking** - Uses tsgo (2-3x faster than tsc)
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
- **Zero configuration**: Works out of the box with sensible defaults
|
|
17
|
-
- **Parallel execution**: Multi-core processing for maximum performance
|
|
18
|
-
- **Auto-fix support**: Automatically fix linting and formatting issues
|
|
19
|
-
- **Comprehensive rules**: 100+ built-in rules for React, TypeScript, a11y, and more
|
|
20
|
-
|
|
21
|
-
### 📦 Release Management
|
|
22
|
-
|
|
23
|
-
- **Semantic versioning**: Automated version bumping (major, minor, patch)
|
|
24
|
-
- **Git integration**: Automatic tagging, committing, and pushing
|
|
25
|
-
- **Interactive prompts**: Guided release workflow with confirmations
|
|
26
|
-
- **npm publishing**: Built-in support for publishing to npm registry
|
|
27
|
-
- **Changelog generation**: Optional automated changelog creation
|
|
28
|
-
- **Multi-package support**: Manage monorepo releases
|
|
20
|
+
## Performance
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
Times vary by project size and cache state:
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
24
|
+
**Small project:**
|
|
25
|
+
- With cache: ~1s total
|
|
26
|
+
- Without cache: ~1s total
|
|
35
27
|
|
|
36
|
-
|
|
28
|
+
**Medium project:**
|
|
29
|
+
- With cache: ~3s total (Oxlint: 2.5s, ESLint: 2.8s, TypeScript: 0.6s)
|
|
30
|
+
- Without cache: ~6s total (Oxlint: 3.2s, ESLint: 4.4s, TypeScript: 5.8s)
|
|
37
31
|
|
|
38
|
-
|
|
39
|
-
- **Smart**: Auto-detects project structure and configuration
|
|
40
|
-
- **Flexible**: Customize via `check.config.ts`
|
|
41
|
-
- **Universal**: Works with any TypeScript/JavaScript project
|
|
32
|
+
Caching provides significant speedup on subsequent runs.
|
|
42
33
|
|
|
43
34
|
## Installation
|
|
44
35
|
|
|
45
|
-
###
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
npm install -g vibe-check
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Bun (Recommended)
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
bun add -g vibe-check
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Local Installation
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
npm install --save-dev vibe-check
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Quick Start
|
|
64
|
-
|
|
65
|
-
### 1. Initialize Configuration
|
|
36
|
+
### Required: Install in Your Project
|
|
66
37
|
|
|
67
38
|
```bash
|
|
68
|
-
|
|
39
|
+
npm install --save-dev @next-vibe/checker
|
|
40
|
+
# or
|
|
41
|
+
bun add -d @next-vibe/checker
|
|
69
42
|
```
|
|
70
43
|
|
|
71
|
-
|
|
44
|
+
### Optional: Install Globally
|
|
72
45
|
|
|
73
|
-
|
|
46
|
+
For the `vibe` command:
|
|
74
47
|
|
|
75
48
|
```bash
|
|
76
|
-
vibe
|
|
49
|
+
npm install -g @next-vibe/checker
|
|
50
|
+
# or
|
|
51
|
+
bun add -g @next-vibe/checker
|
|
77
52
|
```
|
|
78
53
|
|
|
79
|
-
|
|
80
|
-
- ✓ **Oxlint** - Fast Rust linter (1-2s for most projects)
|
|
81
|
-
- ✓ **ESLint** - Custom rules (import sorting, React hooks, i18n)
|
|
82
|
-
- ✓ **TypeScript** - Type checking with tsgo
|
|
54
|
+
Without global install, use `npx @next-vibe/checker` instead of `vibe`.
|
|
83
55
|
|
|
84
|
-
|
|
56
|
+
## Quick Start
|
|
85
57
|
|
|
86
58
|
```bash
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
Automatically fixes:
|
|
91
|
-
- Formatting issues
|
|
92
|
-
- Import order
|
|
93
|
-
- Common linting violations
|
|
59
|
+
# 1. Install in your project
|
|
60
|
+
npm install --save-dev @next-vibe/checker
|
|
94
61
|
|
|
95
|
-
|
|
62
|
+
# 2. Create configuration (interactive)
|
|
63
|
+
vibe config-create
|
|
96
64
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
# Run all checks
|
|
65
|
+
# 3. Run checks
|
|
101
66
|
vibe check
|
|
102
|
-
|
|
103
|
-
# Run with auto-fix
|
|
104
|
-
vibe check --fix
|
|
105
|
-
|
|
106
|
-
# Run specific checks
|
|
107
|
-
vibe check --skip-lint # Skip linting
|
|
108
|
-
vibe check --skip-typecheck # Skip type checking
|
|
109
|
-
|
|
110
|
-
# Verbose output
|
|
111
|
-
vibe check --verbose
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### Release Management
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
# Interactive release (recommended)
|
|
118
|
-
vibe release
|
|
119
|
-
|
|
120
|
-
# Automated release with version increment
|
|
121
|
-
vibe release --version-increment patch # 1.0.0 → 1.0.1
|
|
122
|
-
vibe release --version-increment minor # 1.0.0 → 1.1.0
|
|
123
|
-
vibe release --version-increment major # 1.0.0 → 2.0.0
|
|
124
|
-
|
|
125
|
-
# CI/CD mode (non-interactive)
|
|
126
|
-
vibe release --ci
|
|
127
|
-
|
|
128
|
-
# Dry run (preview changes)
|
|
129
|
-
vibe release --dry-run
|
|
130
67
|
```
|
|
131
68
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
# Setup/update CLI
|
|
139
|
-
vibe setup install
|
|
140
|
-
vibe setup status
|
|
141
|
-
vibe setup update
|
|
142
|
-
vibe setup uninstall
|
|
143
|
-
```
|
|
69
|
+
The `config-create` command sets up:
|
|
70
|
+
- `check.config.ts` - Main configuration
|
|
71
|
+
- `.mcp.json` - MCP server config (optional)
|
|
72
|
+
- `.vscode/settings.json` - VSCode integration (optional)
|
|
73
|
+
- `package.json` scripts - npm run check/lint/typecheck (optional)
|
|
144
74
|
|
|
145
|
-
|
|
75
|
+
## Commands
|
|
146
76
|
|
|
147
77
|
```bash
|
|
148
|
-
#
|
|
149
|
-
vibe
|
|
150
|
-
|
|
151
|
-
#
|
|
152
|
-
|
|
78
|
+
vibe check # Run all checks (auto-fix enabled)
|
|
79
|
+
vibe check src # Check specific paths
|
|
80
|
+
vibe check src public # Check multiple paths
|
|
81
|
+
vibe check some/path.ts # Check specific file
|
|
82
|
+
vibe check --limit=50 # Limit displayed issues
|
|
83
|
+
vibe config-create # Create/update configuration
|
|
84
|
+
vibe mcp # Start MCP server
|
|
85
|
+
vibe list # List all commands
|
|
153
86
|
```
|
|
154
87
|
|
|
155
88
|
## Configuration
|
|
156
89
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
Create `check.config.ts` in your project root:
|
|
90
|
+
The `check.config.ts` file controls all behavior:
|
|
160
91
|
|
|
161
92
|
```typescript
|
|
162
|
-
import type { CheckConfig } from "vibe
|
|
93
|
+
import type { CheckConfig } from "@next-vibe/checker/system/check/config/types";
|
|
163
94
|
|
|
164
95
|
const config: CheckConfig = {
|
|
165
|
-
|
|
96
|
+
vibeCheck: {
|
|
97
|
+
fix: true, // Auto-fix (default: true)
|
|
98
|
+
limit: 200, // Max issues to display
|
|
99
|
+
timeout: 3600, // Max execution time (seconds)
|
|
100
|
+
},
|
|
101
|
+
|
|
166
102
|
oxlint: {
|
|
167
103
|
enabled: true,
|
|
168
104
|
configPath: ".tmp/.oxlintrc.json",
|
|
169
|
-
cachePath: ".tmp/oxlint-cache",
|
|
105
|
+
cachePath: ".tmp/oxlint-cache", // Enable caching
|
|
170
106
|
},
|
|
171
107
|
|
|
172
|
-
// ESLint (custom rules)
|
|
173
108
|
eslint: {
|
|
174
109
|
enabled: true,
|
|
175
110
|
configPath: ".tmp/eslint.config.mjs",
|
|
176
|
-
cachePath: ".tmp/eslint-cache",
|
|
111
|
+
cachePath: ".tmp/eslint-cache", // Enable caching
|
|
177
112
|
},
|
|
178
113
|
|
|
179
|
-
// TypeScript type checking
|
|
180
114
|
typecheck: {
|
|
181
115
|
enabled: true,
|
|
182
|
-
|
|
183
|
-
useTsgo: true, // Use tsgo instead of tsc (faster)
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
// Prettier formatting
|
|
187
|
-
prettier: {
|
|
188
|
-
enabled: true,
|
|
189
|
-
configPath: ".tmp/.oxfmtrc.json",
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
// VSCode integration
|
|
193
|
-
vscode: {
|
|
194
|
-
enabled: true,
|
|
195
|
-
autoGenerateSettings: true,
|
|
116
|
+
useTsgo: true, // 2-3x faster than tsc
|
|
196
117
|
},
|
|
197
118
|
};
|
|
198
119
|
|
|
199
120
|
export default config;
|
|
200
121
|
```
|
|
201
122
|
|
|
202
|
-
|
|
123
|
+
See [check.config.ts](./check.config.ts) for complete example with all options.
|
|
203
124
|
|
|
204
|
-
|
|
125
|
+
## What Gets Checked
|
|
205
126
|
|
|
206
|
-
|
|
207
|
-
|
|
127
|
+
### Oxlint (Rust-powered)
|
|
128
|
+
- 100+ built-in rules for React, TypeScript, a11y
|
|
129
|
+
- Custom plugins:
|
|
130
|
+
- i18n validation (no hardcoded strings)
|
|
131
|
+
- JSX capitalization enforcement
|
|
132
|
+
- Restricted syntax (no `throw`, `unknown`, `object` types)
|
|
133
|
+
- Promise best practices
|
|
134
|
+
- Node.js patterns
|
|
135
|
+
- Unicorn modern JS rules
|
|
136
|
+
- **Uses cache** for faster subsequent runs
|
|
208
137
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
138
|
+
### ESLint
|
|
139
|
+
- Import/export sorting
|
|
140
|
+
- React hooks validation
|
|
141
|
+
- React compiler rules
|
|
142
|
+
- **Uses cache** for faster subsequent runs
|
|
212
143
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
allowNonMain: false,
|
|
217
|
-
},
|
|
144
|
+
### TypeScript
|
|
145
|
+
- Full type checking with tsgo or tsc
|
|
146
|
+
- Strict type rules (optional)
|
|
218
147
|
|
|
219
|
-
|
|
220
|
-
{
|
|
221
|
-
directory: "./",
|
|
222
|
-
updateDeps: true,
|
|
223
|
-
typecheck: "bun run vibe check",
|
|
224
|
-
build: true,
|
|
225
|
-
|
|
226
|
-
release: {
|
|
227
|
-
tagPrefix: "v",
|
|
228
|
-
|
|
229
|
-
git: {
|
|
230
|
-
skipPush: false,
|
|
231
|
-
skipTag: false,
|
|
232
|
-
commitMessage: "chore(release): ${version}",
|
|
233
|
-
remote: "origin",
|
|
234
|
-
},
|
|
235
|
-
|
|
236
|
-
npm: {
|
|
237
|
-
enabled: true,
|
|
238
|
-
access: "public",
|
|
239
|
-
provenance: true,
|
|
240
|
-
},
|
|
241
|
-
|
|
242
|
-
changelog: {
|
|
243
|
-
enabled: true,
|
|
244
|
-
file: "CHANGELOG.md",
|
|
245
|
-
},
|
|
246
|
-
},
|
|
247
|
-
},
|
|
248
|
-
],
|
|
249
|
-
};
|
|
148
|
+
All checks run **in parallel** for maximum speed.
|
|
250
149
|
|
|
251
|
-
|
|
150
|
+
## MCP Server
|
|
151
|
+
|
|
152
|
+
Configure in `.mcp.json` (created by `vibe config-create`):
|
|
153
|
+
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"mcpServers": {
|
|
157
|
+
"vibe": {
|
|
158
|
+
"command": "npx",
|
|
159
|
+
"args": ["@next-vibe/checker", "mcp"],
|
|
160
|
+
"env": {
|
|
161
|
+
"PROJECT_ROOT": "/path/to/your/project"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
252
166
|
```
|
|
253
167
|
|
|
254
|
-
|
|
168
|
+
The MCP server exposes:
|
|
169
|
+
- `check` - Run comprehensive code quality checks
|
|
255
170
|
|
|
256
|
-
|
|
171
|
+
Compatible with any MCP client.
|
|
257
172
|
|
|
258
|
-
|
|
173
|
+
## Usage in Projects
|
|
259
174
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
}
|
|
175
|
+
### With npm Scripts
|
|
176
|
+
|
|
177
|
+
If you selected package.json update during `config-create`:
|
|
178
|
+
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"scripts": {
|
|
182
|
+
"check": "vibe check",
|
|
183
|
+
"lint": "vibe check",
|
|
184
|
+
"typecheck": "vibe check"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Then run:
|
|
190
|
+
```bash
|
|
191
|
+
npm run check
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Without Global Install
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
npx @next-vibe/checker check
|
|
272
198
|
```
|
|
273
199
|
|
|
274
|
-
|
|
200
|
+
## CI/CD Integration
|
|
275
201
|
|
|
276
|
-
|
|
202
|
+
### GitHub Actions
|
|
277
203
|
|
|
278
204
|
```yaml
|
|
279
205
|
name: Code Quality
|
|
280
|
-
|
|
281
206
|
on: [push, pull_request]
|
|
282
207
|
|
|
283
208
|
jobs:
|
|
@@ -285,173 +210,181 @@ jobs:
|
|
|
285
210
|
runs-on: ubuntu-latest
|
|
286
211
|
steps:
|
|
287
212
|
- uses: actions/checkout@v4
|
|
288
|
-
- uses:
|
|
289
|
-
- run:
|
|
290
|
-
- run:
|
|
213
|
+
- uses: actions/setup-node@v4
|
|
214
|
+
- run: npm install
|
|
215
|
+
- run: npm run check
|
|
291
216
|
```
|
|
292
217
|
|
|
293
|
-
|
|
218
|
+
### GitLab CI
|
|
294
219
|
|
|
295
220
|
```yaml
|
|
296
221
|
check:
|
|
297
|
-
image:
|
|
222
|
+
image: node:18
|
|
298
223
|
script:
|
|
299
|
-
-
|
|
300
|
-
-
|
|
224
|
+
- npm install
|
|
225
|
+
- npm run check
|
|
301
226
|
```
|
|
302
227
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
```typescript
|
|
306
|
-
import { vibeCheck } from "vibe-check/system/check/vibe-check/repository";
|
|
307
|
-
import { EndpointLogger } from "vibe-check/system/unified-interface/shared/logger/endpoint";
|
|
308
|
-
|
|
309
|
-
const logger = new EndpointLogger({ level: "info" });
|
|
228
|
+
## Caching
|
|
310
229
|
|
|
311
|
-
|
|
312
|
-
{
|
|
313
|
-
path: "./src",
|
|
314
|
-
fix: true,
|
|
315
|
-
skipTypecheck: false,
|
|
316
|
-
},
|
|
317
|
-
logger,
|
|
318
|
-
);
|
|
230
|
+
The checker uses caching to speed up subsequent runs:
|
|
319
231
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
process.exit(1);
|
|
323
|
-
}
|
|
324
|
-
```
|
|
232
|
+
- **Oxlint cache**: `.tmp/oxlint-cache`
|
|
233
|
+
- **ESLint cache**: `.tmp/eslint-cache`
|
|
325
234
|
|
|
326
|
-
|
|
235
|
+
Cache directories are created automatically. Add `.tmp/` to your `.gitignore`.
|
|
327
236
|
|
|
328
|
-
|
|
237
|
+
On first run (cold cache), checks are slower. Subsequent runs are significantly faster.
|
|
329
238
|
|
|
330
|
-
|
|
239
|
+
## Migrating from Existing Linters
|
|
331
240
|
|
|
332
|
-
|
|
333
|
-
{
|
|
334
|
-
"mcpServers": {
|
|
335
|
-
"vibe-check": {
|
|
336
|
-
"command": "bun",
|
|
337
|
-
"args": ["vibe", "mcp"]
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
```
|
|
241
|
+
If you have existing ESLint, Prettier, or other linter configurations, use this AI agent prompt to migrate cleanly to vibe-check. The agent will port your custom rules to **Oxlint plugins** (preferred, faster) or ESLint where necessary.
|
|
342
242
|
|
|
343
|
-
###
|
|
243
|
+
### AI Agent Migration Prompt
|
|
344
244
|
|
|
345
|
-
|
|
346
|
-
- `fix_code_issues` - Auto-fix linting and formatting issues
|
|
347
|
-
- `analyze_typescript` - Deep TypeScript analysis
|
|
348
|
-
- `get_lint_config` - View current linting configuration
|
|
245
|
+
Copy and paste this into your AI agent (Claude, Cursor, etc.):
|
|
349
246
|
|
|
350
|
-
## Performance
|
|
351
|
-
|
|
352
|
-
### Benchmark Results
|
|
353
|
-
|
|
354
|
-
Tested on a typical Next.js project (500 files, 50k LoC):
|
|
355
|
-
|
|
356
|
-
| Tool | Time | Files/sec |
|
|
357
|
-
| --------- | ------ | --------- |
|
|
358
|
-
| Oxlint | 1.2s | ~417 |
|
|
359
|
-
| ESLint | 3.5s | ~143 |
|
|
360
|
-
| TypeScript| 2.8s | ~179 |
|
|
361
|
-
| **Total** | **3.9s** | **~128** |
|
|
362
|
-
|
|
363
|
-
*Parallel execution ensures total time ≈ slowest check, not sum of all checks*
|
|
364
|
-
|
|
365
|
-
### Optimization Tips
|
|
366
|
-
|
|
367
|
-
1. **Use tsgo**: 2-3x faster than `tsc`
|
|
368
|
-
2. **Enable caching**: Reuse results across runs
|
|
369
|
-
3. **Parallel workers**: Auto-scales to CPU cores
|
|
370
|
-
4. **Incremental checks**: Only check changed files
|
|
371
|
-
|
|
372
|
-
## Troubleshooting
|
|
373
|
-
|
|
374
|
-
### Common Issues
|
|
375
|
-
|
|
376
|
-
**Q: "Config file not found"**
|
|
377
|
-
```bash
|
|
378
|
-
vibe check --create-config
|
|
379
247
|
```
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
248
|
+
I need to migrate my project to @next-vibe/checker and port all existing linting configurations.
|
|
249
|
+
|
|
250
|
+
PROJECT CONTEXT:
|
|
251
|
+
- Current linters: [list your linters: ESLint, Prettier, TSLint, etc.]
|
|
252
|
+
- Custom rules: [describe any custom rules you have]
|
|
253
|
+
- Config files: [list: .eslintrc.js, .prettierrc, etc.]
|
|
254
|
+
|
|
255
|
+
MIGRATION REQUIREMENTS:
|
|
256
|
+
|
|
257
|
+
1. INSTALL & SETUP
|
|
258
|
+
- Install: npm install --save-dev @next-vibe/checker
|
|
259
|
+
- Run: vibe config-create (interactive setup)
|
|
260
|
+
- Select all relevant options (React, Next.js, i18n, etc.)
|
|
261
|
+
|
|
262
|
+
2. PORT CUSTOM RULES TO OXLINT PLUGINS (PREFERRED)
|
|
263
|
+
- Analyze my existing custom ESLint rules
|
|
264
|
+
- Create Oxlint plugins as TypeScript files in oxlint-plugins/
|
|
265
|
+
- Follow the pattern from check.config.ts jsPlugins configuration
|
|
266
|
+
- Oxlint plugins are FASTER than ESLint - prefer this approach
|
|
267
|
+
- Only use ESLint for rules that absolutely cannot be implemented in Oxlint
|
|
268
|
+
|
|
269
|
+
3. OXLINT PLUGIN STRUCTURE
|
|
270
|
+
Each plugin should be a TypeScript file that exports rules:
|
|
271
|
+
```typescript
|
|
272
|
+
// oxlint-plugins/my-custom-rule.ts
|
|
273
|
+
export default {
|
|
274
|
+
rules: {
|
|
275
|
+
'my-rule-name': {
|
|
276
|
+
create(context) {
|
|
277
|
+
// Rule implementation
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Register in check.config.ts:
|
|
285
|
+
```typescript
|
|
286
|
+
jsPlugins: [
|
|
287
|
+
"oxlint-plugins/my-custom-rule.ts"
|
|
288
|
+
]
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
4. UPDATE check.config.ts
|
|
292
|
+
- Port all rule configurations from old config files
|
|
293
|
+
- Map ESLint rules to equivalent Oxlint rules where possible
|
|
294
|
+
- Configure custom Oxlint plugins
|
|
295
|
+
- Only add ESLint rules that have no Oxlint equivalent
|
|
296
|
+
- Set appropriate severity levels (error/warn)
|
|
297
|
+
|
|
298
|
+
5. CLEAN UP OLD CONFIGS
|
|
299
|
+
- Remove old config files: .eslintrc.*, .prettierrc, etc.
|
|
300
|
+
- Remove old linter packages from package.json
|
|
301
|
+
- Update package.json scripts to use vibe check
|
|
302
|
+
- Remove old linter-specific ignore files
|
|
303
|
+
|
|
304
|
+
6. TEST THE MIGRATION
|
|
305
|
+
- Run: vibe check
|
|
306
|
+
- Verify all custom rules are working
|
|
307
|
+
- Test auto-fix functionality
|
|
308
|
+
- Compare results with old linter to ensure nothing is missed
|
|
309
|
+
- Run on a few test files with known issues
|
|
310
|
+
- Verify TypeScript checking works correctly
|
|
311
|
+
|
|
312
|
+
7. VERIFY CUSTOM RULES
|
|
313
|
+
- Create test files that should trigger each custom rule
|
|
314
|
+
- Confirm rules are enforced correctly
|
|
315
|
+
- Test that auto-fix works for fixable rules
|
|
316
|
+
- Document any rules that couldn't be migrated and why
|
|
317
|
+
|
|
318
|
+
8. UPDATE DOCUMENTATION
|
|
319
|
+
- Update project README with new lint commands
|
|
320
|
+
- Document any custom Oxlint plugins created
|
|
321
|
+
- Add notes about which rules are Oxlint vs ESLint
|
|
322
|
+
|
|
323
|
+
PREFERENCES:
|
|
324
|
+
- ALWAYS prefer Oxlint plugins over ESLint (much faster)
|
|
325
|
+
- Use ESLint only when absolutely necessary
|
|
326
|
+
- Maintain the same strictness level as before
|
|
327
|
+
- Preserve all custom rule logic
|
|
328
|
+
- Enable auto-fix where possible
|
|
329
|
+
|
|
330
|
+
OUTPUT REQUIREMENTS:
|
|
331
|
+
- List of all custom Oxlint plugins created
|
|
332
|
+
- Explanation of which ESLint rules couldn't be ported and why
|
|
333
|
+
- Summary of migration changes
|
|
334
|
+
- Test results showing rules work correctly
|
|
335
|
+
- Any recommendations for further optimization
|
|
336
|
+
|
|
337
|
+
Please proceed with the migration step by step, asking for clarification if needed.
|
|
392
338
|
```
|
|
393
339
|
|
|
394
|
-
|
|
395
|
-
- Ensure `globalVersion` in `release.config.ts` matches your package.json
|
|
396
|
-
- Version increments work from max(git tag, configured version)
|
|
340
|
+
### After Migration
|
|
397
341
|
|
|
398
|
-
|
|
342
|
+
1. **Verify everything works:**
|
|
343
|
+
```bash
|
|
344
|
+
vibe check
|
|
345
|
+
```
|
|
399
346
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
347
|
+
2. **Test on specific files:**
|
|
348
|
+
```bash
|
|
349
|
+
vibe check src/problematic-file.ts
|
|
350
|
+
```
|
|
403
351
|
|
|
404
|
-
|
|
352
|
+
3. **Check CI/CD:**
|
|
353
|
+
Update your CI configuration to use `npm run check`
|
|
405
354
|
|
|
406
|
-
|
|
355
|
+
4. **Commit changes:**
|
|
356
|
+
```bash
|
|
357
|
+
git add .
|
|
358
|
+
git commit -m "Migrate to @next-vibe/checker with custom Oxlint plugins"
|
|
359
|
+
```
|
|
407
360
|
|
|
408
|
-
|
|
361
|
+
### Oxlint Plugin Resources
|
|
409
362
|
|
|
410
|
-
-
|
|
411
|
-
-
|
|
412
|
-
-
|
|
413
|
-
-
|
|
363
|
+
- See `oxlint-plugins/` directory in this repository for examples
|
|
364
|
+
- Oxlint plugins are TypeScript files that export rule definitions
|
|
365
|
+
- Much faster than ESLint (Rust-powered execution)
|
|
366
|
+
- Full access to AST for powerful custom rules
|
|
414
367
|
|
|
415
|
-
|
|
368
|
+
## Contributing
|
|
369
|
+
|
|
370
|
+
This project lives on the `vibe-check` branch:
|
|
416
371
|
|
|
417
372
|
```bash
|
|
418
|
-
git clone https://github.com/
|
|
373
|
+
git clone https://github.com/techfreaque/next-vibe.git
|
|
419
374
|
cd next-vibe
|
|
420
375
|
git checkout vibe-check
|
|
421
376
|
bun install
|
|
422
377
|
bun vibe check
|
|
423
378
|
```
|
|
424
379
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
```bash
|
|
428
|
-
bun test
|
|
429
|
-
```
|
|
380
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guidelines.
|
|
430
381
|
|
|
431
382
|
## License
|
|
432
383
|
|
|
433
|
-
GPL-3.0-only - see [LICENSE](LICENSE)
|
|
434
|
-
|
|
435
|
-
## Credits
|
|
436
|
-
|
|
437
|
-
Created by **Max Brandstätter** ([@maxbrandstatter](https://github.com/maxbrandstatter))
|
|
438
|
-
|
|
439
|
-
Built with contributions from:
|
|
440
|
-
- Claude Code
|
|
441
|
-
- Augment
|
|
442
|
-
- t3.chat
|
|
443
|
-
- Cursor
|
|
444
|
-
|
|
445
|
-
### Special Thanks
|
|
446
|
-
|
|
447
|
-
Tools that didn't make the cut (RIP):
|
|
448
|
-
- ~~ChatGPT~~ (fired)
|
|
449
|
-
- ~~Copilot~~ (fired)
|
|
450
|
-
- ~~v0.dev~~ (fired)
|
|
451
|
-
- ~~Devin~~ (fired)
|
|
452
|
-
|
|
453
|
-
---
|
|
384
|
+
GPL-3.0-only - see [LICENSE](LICENSE)
|
|
454
385
|
|
|
455
|
-
|
|
386
|
+
## Links
|
|
456
387
|
|
|
457
|
-
|
|
388
|
+
- [GitHub Repository](https://github.com/techfreaque/next-vibe/tree/vibe-check)
|
|
389
|
+
- [npm Package](https://www.npmjs.com/package/@next-vibe/checker)
|
|
390
|
+
- [Report Issues](https://github.com/techfreaque/next-vibe/issues)
|