@next-vibe/checker 1.0.11
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/LICENSE +674 -0
- package/.dist/README.md +458 -0
- package/.dist/bin/vibe-runtime.js +55482 -0
- package/.dist/bin/vibe-runtime.js.map +431 -0
- package/LICENSE +10 -0
- package/README.md +458 -0
- package/check.config.ts +989 -0
- package/package.json +129 -0
- package/src/config/constants.ts +9 -0
- package/src/config/debug.ts +30 -0
- package/src/config/env-client.ts +62 -0
- package/src/config/env.ts +59 -0
- package/src/config/i18n/de/index.ts +3 -0
- package/src/config/i18n/en/index.ts +60 -0
- package/src/config/i18n/pl/index.ts +3 -0
- package/src/i18n/core/config.ts +229 -0
- package/src/i18n/core/language-utils.ts +236 -0
- package/src/i18n/core/localization-utils.ts +422 -0
- package/src/i18n/core/scoped-translation.ts +120 -0
- package/src/i18n/core/shared-component.tsx +30 -0
- package/src/i18n/core/shared-translation-utils.ts +97 -0
- package/src/i18n/core/shared.ts +44 -0
- package/src/i18n/core/static-types.ts +72 -0
- package/src/i18n/core/translation-utils.ts +218 -0
- package/src/i18n/de/index.ts +8 -0
- package/src/i18n/en/index.ts +7 -0
- package/src/i18n/index.ts +100 -0
- package/src/i18n/pl/index.ts +7 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
Copyright Marcus Brandstätter
|
|
3
|
+
|
|
4
|
+
MIT License
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
7
|
+
|
|
8
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
# vibe-check
|
|
2
|
+
|
|
3
|
+
> Minimal TypeScript code quality checker with CLI and MCP support
|
|
4
|
+
|
|
5
|
+
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
6
|
+
[](https://www.npmjs.com/package/vibe-check)
|
|
7
|
+
[](https://nodejs.org)
|
|
8
|
+
|
|
9
|
+
A lightning-fast, zero-config code quality tool that combines **Oxlint**, **ESLint**, and **TypeScript** checking with built-in release management and MCP server support.
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
### 🚀 Code Quality
|
|
14
|
+
|
|
15
|
+
- **Triple-layer validation**: Oxlint (Rust-powered speed) + ESLint (custom rules) + TypeScript (type safety)
|
|
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
|
|
29
|
+
|
|
30
|
+
### 🤖 MCP Server
|
|
31
|
+
|
|
32
|
+
- **Claude Desktop integration**: Use vibe-check as a Model Context Protocol server
|
|
33
|
+
- **AI-powered code review**: Let Claude analyze your codebase quality
|
|
34
|
+
- **Interactive debugging**: Real-time feedback on code issues
|
|
35
|
+
|
|
36
|
+
### 🛠️ Developer Experience
|
|
37
|
+
|
|
38
|
+
- **Fast**: Rust-based oxlint + parallel processing
|
|
39
|
+
- **Smart**: Auto-detects project structure and configuration
|
|
40
|
+
- **Flexible**: Customize via `check.config.ts`
|
|
41
|
+
- **Universal**: Works with any TypeScript/JavaScript project
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
### NPM
|
|
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
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
vibe check --create-config
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
This creates a `check.config.ts` file with sensible defaults.
|
|
72
|
+
|
|
73
|
+
### 2. Run Code Quality Checks
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
vibe check
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
This runs:
|
|
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
|
|
83
|
+
|
|
84
|
+
### 3. Auto-fix Issues
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
vibe check --fix
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Automatically fixes:
|
|
91
|
+
- Formatting issues
|
|
92
|
+
- Import order
|
|
93
|
+
- Common linting violations
|
|
94
|
+
|
|
95
|
+
## CLI Commands
|
|
96
|
+
|
|
97
|
+
### Code Quality
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Run all checks
|
|
101
|
+
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
|
+
```
|
|
131
|
+
|
|
132
|
+
### Build & Setup
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Build the project
|
|
136
|
+
vibe builder
|
|
137
|
+
|
|
138
|
+
# Setup/update CLI
|
|
139
|
+
vibe setup install
|
|
140
|
+
vibe setup status
|
|
141
|
+
vibe setup update
|
|
142
|
+
vibe setup uninstall
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### MCP Server
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Start MCP server for Claude Desktop
|
|
149
|
+
vibe mcp
|
|
150
|
+
|
|
151
|
+
# Test MCP server
|
|
152
|
+
bunx @modelcontextprotocol/inspector bun vibe mcp
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Configuration
|
|
156
|
+
|
|
157
|
+
### check.config.ts
|
|
158
|
+
|
|
159
|
+
Create `check.config.ts` in your project root:
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
import type { CheckConfig } from "vibe-check/system/check/config/types";
|
|
163
|
+
|
|
164
|
+
const config: CheckConfig = {
|
|
165
|
+
// Oxlint (fast Rust linter)
|
|
166
|
+
oxlint: {
|
|
167
|
+
enabled: true,
|
|
168
|
+
configPath: ".tmp/.oxlintrc.json",
|
|
169
|
+
cachePath: ".tmp/oxlint-cache",
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
// ESLint (custom rules)
|
|
173
|
+
eslint: {
|
|
174
|
+
enabled: true,
|
|
175
|
+
configPath: ".tmp/eslint.config.mjs",
|
|
176
|
+
cachePath: ".tmp/eslint-cache",
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
// TypeScript type checking
|
|
180
|
+
typecheck: {
|
|
181
|
+
enabled: true,
|
|
182
|
+
cachePath: ".tmp/typecheck-cache",
|
|
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,
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
export default config;
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### release.config.ts
|
|
203
|
+
|
|
204
|
+
Create `release.config.ts` for release automation:
|
|
205
|
+
|
|
206
|
+
```typescript
|
|
207
|
+
import type { ReleaseFileConfig } from "vibe-check/system/release-tool/definition";
|
|
208
|
+
|
|
209
|
+
const releaseConfig: ReleaseFileConfig = {
|
|
210
|
+
packageManager: "bun", // or "npm", "yarn", "pnpm"
|
|
211
|
+
globalVersion: "1.0.0", // Synchronized version
|
|
212
|
+
|
|
213
|
+
branch: {
|
|
214
|
+
main: "main",
|
|
215
|
+
develop: "dev",
|
|
216
|
+
allowNonMain: false,
|
|
217
|
+
},
|
|
218
|
+
|
|
219
|
+
packages: [
|
|
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
|
+
};
|
|
250
|
+
|
|
251
|
+
export default releaseConfig;
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Advanced Usage
|
|
255
|
+
|
|
256
|
+
### Custom Rules
|
|
257
|
+
|
|
258
|
+
Customize linting rules in `check.config.ts`:
|
|
259
|
+
|
|
260
|
+
```typescript
|
|
261
|
+
const config: CheckConfig = {
|
|
262
|
+
oxlint: {
|
|
263
|
+
enabled: true,
|
|
264
|
+
rules: {
|
|
265
|
+
"no-console": "error",
|
|
266
|
+
"no-debugger": "error",
|
|
267
|
+
"typescript/no-explicit-any": "error",
|
|
268
|
+
},
|
|
269
|
+
ignorePatterns: ["dist", "node_modules", ".next"],
|
|
270
|
+
},
|
|
271
|
+
};
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### CI/CD Integration
|
|
275
|
+
|
|
276
|
+
#### GitHub Actions
|
|
277
|
+
|
|
278
|
+
```yaml
|
|
279
|
+
name: Code Quality
|
|
280
|
+
|
|
281
|
+
on: [push, pull_request]
|
|
282
|
+
|
|
283
|
+
jobs:
|
|
284
|
+
check:
|
|
285
|
+
runs-on: ubuntu-latest
|
|
286
|
+
steps:
|
|
287
|
+
- uses: actions/checkout@v4
|
|
288
|
+
- uses: oven-sh/setup-bun@v2
|
|
289
|
+
- run: bun install
|
|
290
|
+
- run: bun vibe check
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
#### GitLab CI
|
|
294
|
+
|
|
295
|
+
```yaml
|
|
296
|
+
check:
|
|
297
|
+
image: oven/bun:latest
|
|
298
|
+
script:
|
|
299
|
+
- bun install
|
|
300
|
+
- bun vibe check
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Programmatic Usage
|
|
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" });
|
|
310
|
+
|
|
311
|
+
const result = await vibeCheck.execute(
|
|
312
|
+
{
|
|
313
|
+
path: "./src",
|
|
314
|
+
fix: true,
|
|
315
|
+
skipLint: false,
|
|
316
|
+
skipTypecheck: false,
|
|
317
|
+
},
|
|
318
|
+
logger,
|
|
319
|
+
);
|
|
320
|
+
|
|
321
|
+
if (!result.success) {
|
|
322
|
+
console.error("Check failed:", result.data.issues);
|
|
323
|
+
process.exit(1);
|
|
324
|
+
}
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
## MCP Server Setup
|
|
328
|
+
|
|
329
|
+
### Claude Desktop Configuration
|
|
330
|
+
|
|
331
|
+
Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
332
|
+
|
|
333
|
+
```json
|
|
334
|
+
{
|
|
335
|
+
"mcpServers": {
|
|
336
|
+
"vibe-check": {
|
|
337
|
+
"command": "bun",
|
|
338
|
+
"args": ["vibe", "mcp"]
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### Available MCP Tools
|
|
345
|
+
|
|
346
|
+
- `check_code_quality` - Run comprehensive code quality checks
|
|
347
|
+
- `fix_code_issues` - Auto-fix linting and formatting issues
|
|
348
|
+
- `analyze_typescript` - Deep TypeScript analysis
|
|
349
|
+
- `get_lint_config` - View current linting configuration
|
|
350
|
+
|
|
351
|
+
## Performance
|
|
352
|
+
|
|
353
|
+
### Benchmark Results
|
|
354
|
+
|
|
355
|
+
Tested on a typical Next.js project (500 files, 50k LoC):
|
|
356
|
+
|
|
357
|
+
| Tool | Time | Files/sec |
|
|
358
|
+
| --------- | ------ | --------- |
|
|
359
|
+
| Oxlint | 1.2s | ~417 |
|
|
360
|
+
| ESLint | 3.5s | ~143 |
|
|
361
|
+
| TypeScript| 2.8s | ~179 |
|
|
362
|
+
| **Total** | **3.9s** | **~128** |
|
|
363
|
+
|
|
364
|
+
*Parallel execution ensures total time ≈ slowest check, not sum of all checks*
|
|
365
|
+
|
|
366
|
+
### Optimization Tips
|
|
367
|
+
|
|
368
|
+
1. **Use tsgo**: 2-3x faster than `tsc`
|
|
369
|
+
2. **Enable caching**: Reuse results across runs
|
|
370
|
+
3. **Parallel workers**: Auto-scales to CPU cores
|
|
371
|
+
4. **Incremental checks**: Only check changed files
|
|
372
|
+
|
|
373
|
+
## Troubleshooting
|
|
374
|
+
|
|
375
|
+
### Common Issues
|
|
376
|
+
|
|
377
|
+
**Q: "Config file not found"**
|
|
378
|
+
```bash
|
|
379
|
+
vibe check --create-config
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
**Q: "Oxlint fails to parse config"**
|
|
383
|
+
- Ensure you're using `ignorePatterns` not `ignores`
|
|
384
|
+
- Check schema URL: `./node_modules/oxlint/configuration_schema.json`
|
|
385
|
+
|
|
386
|
+
**Q: "Type checking is slow"**
|
|
387
|
+
```typescript
|
|
388
|
+
// In check.config.ts
|
|
389
|
+
typecheck: {
|
|
390
|
+
enabled: true,
|
|
391
|
+
useTsgo: true, // Enable tsgo instead of tsc
|
|
392
|
+
}
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
**Q: "Release tool doesn't bump version correctly"**
|
|
396
|
+
- Ensure `globalVersion` in `release.config.ts` matches your package.json
|
|
397
|
+
- Version increments work from max(git tag, configured version)
|
|
398
|
+
|
|
399
|
+
### Debug Mode
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
vibe check --debug
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
Shows detailed execution logs, file discovery, and rule evaluation.
|
|
406
|
+
|
|
407
|
+
## Contributing
|
|
408
|
+
|
|
409
|
+
Contributions are welcome! This project is built with:
|
|
410
|
+
|
|
411
|
+
- **Bun** - Fast JavaScript runtime
|
|
412
|
+
- **TypeScript** - Type safety
|
|
413
|
+
- **Oxlint** - Rust-based linter
|
|
414
|
+
- **Next.js** - Framework patterns
|
|
415
|
+
|
|
416
|
+
### Development Setup
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
git clone https://github.com/maxbrandstatter/next-vibe.git
|
|
420
|
+
cd next-vibe
|
|
421
|
+
git checkout vibe-check
|
|
422
|
+
bun install
|
|
423
|
+
bun vibe check
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### Running Tests
|
|
427
|
+
|
|
428
|
+
```bash
|
|
429
|
+
bun test
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
## License
|
|
433
|
+
|
|
434
|
+
GPL-3.0-only - see [LICENSE](LICENSE) for details.
|
|
435
|
+
|
|
436
|
+
## Credits
|
|
437
|
+
|
|
438
|
+
Created by **Max Brandstätter** ([@maxbrandstatter](https://github.com/maxbrandstatter))
|
|
439
|
+
|
|
440
|
+
Built with contributions from:
|
|
441
|
+
- Claude Code
|
|
442
|
+
- Augment
|
|
443
|
+
- t3.chat
|
|
444
|
+
- Cursor
|
|
445
|
+
|
|
446
|
+
### Special Thanks
|
|
447
|
+
|
|
448
|
+
Tools that didn't make the cut (RIP):
|
|
449
|
+
- ~~ChatGPT~~ (fired)
|
|
450
|
+
- ~~Copilot~~ (fired)
|
|
451
|
+
- ~~v0.dev~~ (fired)
|
|
452
|
+
- ~~Devin~~ (fired)
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
**Need help?** [Open an issue](https://github.com/maxbrandstatter/next-vibe/issues)
|
|
457
|
+
|
|
458
|
+
**Love vibe-check?** [Star the repo](https://github.com/maxbrandstatter/next-vibe) ⭐
|