@next-vibe/checker 1.0.49 → 1.0.51

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.
Files changed (32) hide show
  1. package/.dist/README.md +142 -245
  2. package/.dist/bin/vibe-runtime.js +37 -122
  3. package/.dist/bin/vibe-runtime.js.map +25 -25
  4. package/README.md +142 -245
  5. package/check.config.ts +1 -2
  6. package/package.json +1 -1
  7. package/src/app/api/[locale]/system/builder/definition.ts +7 -1
  8. package/src/app/api/[locale]/system/check/config/types.ts +0 -2
  9. package/src/app/api/[locale]/system/check/lint/definition.ts +0 -14
  10. package/src/app/api/[locale]/system/check/lint/i18n/de/index.ts +0 -4
  11. package/src/app/api/[locale]/system/check/lint/i18n/en/index.ts +0 -4
  12. package/src/app/api/[locale]/system/check/lint/i18n/pl/index.ts +0 -4
  13. package/src/app/api/[locale]/system/check/lint/repository.ts +1 -4
  14. package/src/app/api/[locale]/system/check/oxlint/definition.ts +0 -14
  15. package/src/app/api/[locale]/system/check/oxlint/i18n/de/index.ts +0 -4
  16. package/src/app/api/[locale]/system/check/oxlint/i18n/en/index.ts +0 -4
  17. package/src/app/api/[locale]/system/check/oxlint/i18n/pl/index.ts +0 -4
  18. package/src/app/api/[locale]/system/check/oxlint/repository.ts +4 -18
  19. package/src/app/api/[locale]/system/check/test-project/check.config.ts +0 -1
  20. package/src/app/api/[locale]/system/check/test-project/tsconfig.tsbuildinfo +1 -1
  21. package/src/app/api/[locale]/system/check/typecheck/definition.ts +0 -12
  22. package/src/app/api/[locale]/system/check/typecheck/i18n/de/index.ts +0 -4
  23. package/src/app/api/[locale]/system/check/typecheck/i18n/en/index.ts +0 -4
  24. package/src/app/api/[locale]/system/check/typecheck/i18n/pl/index.ts +0 -4
  25. package/src/app/api/[locale]/system/check/typecheck/repository.ts +1 -4
  26. package/src/app/api/[locale]/system/check/vibe-check/definition.ts +0 -17
  27. package/src/app/api/[locale]/system/check/vibe-check/i18n/de/index.ts +0 -4
  28. package/src/app/api/[locale]/system/check/vibe-check/i18n/en/index.ts +0 -4
  29. package/src/app/api/[locale]/system/check/vibe-check/i18n/pl/index.ts +0 -4
  30. package/src/app/api/[locale]/system/check/vibe-check/repository.ts +1 -8
  31. package/src/app/api/[locale]/system/help/interactive/definition.ts +6 -1
  32. package/src/app/api/[locale]/system/unified-interface/cli/vibe-runtime.ts +1 -1
package/.dist/README.md CHANGED
@@ -1,57 +1,50 @@
1
- # @next-vibe/checker
1
+ # @next-vibe/checker aka vibe check
2
2
 
3
- > Comprehensive TypeScript code quality checker combining Oxlint, ESLint, and TypeScript
3
+ Run Oxlint, ESLint, and TypeScript in parallel. Fast caching, auto-fix by default.
4
4
 
5
5
  [![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
6
6
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org)
7
7
 
8
- Run parallel code quality checks (Oxlint + ESLint + TypeScript) with auto-fix enabled by default. Built with Rust-powered Oxlint for maximum performance.
9
-
10
8
  ## Features
11
9
 
12
10
  - **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)
11
+ - **Smart caching** - 10x faster on large projects (41s → 4s)
12
+ - **Auto-fix** - Fixes issues by default
13
+ - **100+ rules** - React, TypeScript, a11y, Next.js, Node.js, custom plugins
14
+ - **MCP server** - Integrate with Claude via Model Context Protocol
15
+ - **Fast type checking** - tsgo (2-3x faster than tsc)
19
16
 
20
17
  ## Performance
21
18
 
22
- Times vary by project size and cache state. **tsgo is enabled by default** (2-3x faster than tsc).
23
-
24
- **Small project:**
25
-
26
- - With cache: 1.1s total (Oxlint: 0.48s, ESLint: 1.06s, TypeScript: 0.20s)
27
- - Without cache: 1.1s total (Oxlint: 0.48s, ESLint: 1.06s, TypeScript: 0.20s)
28
- - **With tsc: 1.1s cached / 1.5s uncached**
29
-
30
- **Medium project:**
19
+ | Project | Cold Cache | Warm Cache | Speed |
20
+ | ------- | ---------- | ---------- | ----- |
21
+ | Small | 0.69s | 0.71s | 1x |
22
+ | Medium | 5.51s | 1.30s | 4x |
23
+ | Large | 41.24s | 4.29s | 10x |
31
24
 
32
- - With cache: 2.8s total (Oxlint: 2.55s, ESLint: 2.76s, TypeScript: 0.62s)
33
- - Without cache: 5.9s total (Oxlint: 3.17s, ESLint: 4.37s, TypeScript: 5.81s)
34
- - **With tsc: 12.5s cached / 13.9s uncached**
25
+ Caching is automatic. Add `.tmp/` to `.gitignore`.
35
26
 
36
- **Large project:**
37
-
38
- - With cache: 9.8s total (Oxlint: 9.80s, ESLint: 3.71s, TypeScript: 3.83s)
39
- - Without cache: 51.3s total (Oxlint: 16.76s, ESLint: 23.87s, TypeScript: 51.30s)
40
- - **With tsc: 12.7s cached / 72.9s uncached**
27
+ ## Quick Start
41
28
 
42
- **Key insights:**
29
+ ```bash
30
+ npm install --save-dev @next-vibe/checker
31
+ npx @next-vibe/checker config-create
32
+ npm run check
33
+ ```
43
34
 
44
- - **Caching provides 5x speedup on large projects**
45
- - **tsgo is 2-3x faster than tsc for TypeScript checking**
46
- - **ESLint can be disabled** if you only need Oxlint rules (saves ~3s on large projects)
35
+ That's it. `config-create` adds check/lint/typecheck scripts to package.json. Then just use `npm run check`.
47
36
 
48
- ## Installation
37
+ For global install (optional):
49
38
 
50
- ### Recommended: AI-Assisted Setup (Clean Migration)
39
+ ```bash
40
+ npm install -g @next-vibe/checker
41
+ vibe config-create # or shorter: v cc
42
+ vibe check # or shorter: v c
43
+ ```
51
44
 
52
- **Best for:** Migrating from existing linters (ESLint, Prettier, etc.) or setting up from scratch.
45
+ ## Migrate from ESLint/Prettier
53
46
 
54
- Copy this prompt to your AI agent (Claude Code, Cursor, etc.):
47
+ Copy this prompt to your AI agent:
55
48
 
56
49
  ```
57
50
  Migrate to @next-vibe/checker:
@@ -65,180 +58,105 @@ STEP 1: Ask user questions
65
58
  - Enable pedantic rules?
66
59
  - Enable restricted syntax? (no throw, unknown, any, object)
67
60
  - Create .mcp.json?
68
- - Install globally? (makes `vibe` and `v` commands available everywhere)
69
- - VSCode integration? (only ask if .vscode folder doesn't exist - auto-enable if it exists)
61
+ - Install globally?
62
+ - VSCode integration?
70
63
 
71
64
  STEP 2: Install and create config
72
- 1. Detect package manager (check for bun.lockb, package-lock.json, yarn.lock, pnpm-lock.yaml)
73
- 2. Install locally: <pm> add -D @next-vibe/checker
74
- 3. If user wants global: <pm> add -g @next-vibe/checker (or global install command for pm)
75
- 4. Delete old check.config.ts if it exists
76
- 5. Detect VSCode: Check if .vscode folder exists
77
- 6. Create config with user's answers:
78
- <pm-exec> @next-vibe/checker config-create \
79
- --update-package-json=true \
80
- --create-mcp-config=<true|false> \
81
- --update-vscode-settings=<true if .vscode exists OR user said yes> \
82
- --enable-react-rules=<true|false> \
83
- --enable-nextjs-rules=<true|false> \
84
- --enable-i18n-rules=<true|false> \
85
- --enable-pedantic-rules=<true|false> \
86
- --enable-restricted-syntax=<true|false>
87
- Note: package.json scripts updated automatically to "v c"
88
-
89
- STEP 3: Customize check.config.ts and editor
65
+ 1. Detect package manager (bun.lockb, package-lock.json, yarn.lock, pnpm-lock.yaml)
66
+ 2. Install: npm add -D @next-vibe/checker (or equivalent for your package manager)
67
+ 3. If global: npm install -g @next-vibe/checker
68
+ 4. Run: npm exec @next-vibe/checker config-create
69
+ (or: npx @next-vibe/checker config-create)
70
+
71
+ STEP 3: Configure
90
72
  1. Read check.config.ts
91
- 2. If user wants to disable ESLint: Change line 721 from `enabled: true,` to `enabled: false,`
92
- 3. If strictness is pedantic: Change line 47 from `pedantic: false,` to `pedantic: true,`
93
- 4. Analyze old linter configs (.eslintrc.*, .prettierrc, etc.) for custom rules
94
- 5. Port custom rules to Oxlint plugins (create files in oxlint-plugins/*.ts)
95
- 6. Add custom plugin paths to jsPlugins array around line 125
96
- 7. Setup editor integration:
97
- - VSCode: Already configured via .vscode/settings.json (oxc extension, tsgo)
98
- - Other editors: Detect editor, configure for tsgo and oxlint:
99
- * JetBrains IDEs: Setup oxlint file watcher, configure tsgo for TypeScript
100
- * Neovim/Vim: Configure LSP for oxlint and tsgo
101
- * Sublime/Atom/etc: Setup linter plugins
73
+ 2. To disable ESLint: Change `skipEslint: false` to `skipEslint: true`
74
+ 3. To enable pedantic: In the `features` object at line 46, change `pedantic: false` to `pedantic: true`
75
+ 4. Analyze old .eslintrc, .prettierrc, eslint config files
76
+ 5. Port custom rules to Oxlint plugins (oxlint-plugins/*.ts)
77
+ 6. Add plugin paths to jsPlugins array in config (around line 124)
78
+ 7. Setup editor:
79
+ - VSCode: .vscode/settings.json (oxc extension, tsgo)
80
+ - JetBrains: oxlint file watcher, tsgo for TypeScript
81
+ - Neovim/Vim: LSP for oxlint and tsgo
102
82
  8. Remove old linter packages and configs
103
- 9. Test: <pm-exec> @next-vibe/checker check
104
- 10. Report results (what was changed, what rules were ported, editor setup)
105
-
106
- Oxlint plugins are much faster than ESLint - always prefer them for custom rules.
107
- ```
83
+ 9. Test: npm exec @next-vibe/checker check (or: npx @next-vibe/checker check)
84
+ 10. Report what was changed and migrated
108
85
 
109
- The AI agent will handle the complete migration automatically.
110
-
111
- ### Manual Installation
112
-
113
- ```bash
114
- npm install --save-dev @next-vibe/checker
115
- # or
116
- bun add -d @next-vibe/checker
117
- ```
118
-
119
- Optional global install for `vibe` command:
120
-
121
- ```bash
122
- npm install -g @next-vibe/checker
123
- # or
124
- bun add -g @next-vibe/checker
86
+ Note: Oxlint plugins are much faster than ESLint rules - prefer them.
125
87
  ```
126
88
 
127
- Without global install, use `npx @next-vibe/checker` instead of `vibe`.
89
+ The AI will handle the complete migration automatically.
128
90
 
129
- ## Quick Start
91
+ ## Commands
130
92
 
131
93
  ```bash
132
- # 1. Install in your project
133
- npm install --save-dev @next-vibe/checker
134
-
135
- # 2. Create configuration (interactive)
136
- vibe config-create
137
-
138
- # 3. Run checks
139
- vibe check
140
- # or use the short version:
141
- v c
94
+ vibe check [paths] # Run all checks
95
+ vibe check src # Check specific directory
96
+ vibe check src app.tsx # Check multiple paths
97
+ vibe check --limit=50 # Show first 50 issues (default: 200)
98
+ vibe check --fix # Auto-fix issues
99
+ vibe check --timeout=600 # Max execution time (seconds)
100
+ vibe check --page=2 # View page 2 of results
101
+ vibe config-create # Create/update configuration
102
+ vibe mcp # Start MCP server
103
+ vibe list # All available commands
142
104
  ```
143
105
 
144
- **Tip:** Use `v` as a short alias for `vibe` and `c` for `check` (e.g., `v c` instead of `vibe check`).
145
-
146
- The `config-create` command interactively sets up:
147
-
148
- - `check.config.ts` - Main configuration
149
- - ESLint enable/disable - Only needed for rules not in Oxlint (import sorting, React hooks)
150
- - `.mcp.json` - MCP server config (optional)
151
- - `.vscode/settings.json` - VSCode integration (optional)
152
- - `package.json` scripts - npm run check/lint/typecheck (optional)
106
+ Without global install, replace `vibe` with `npx @next-vibe/checker` or `npm exec @next-vibe/checker`.
153
107
 
154
- ## Commands
155
-
156
- ```bash
157
- vibe check # Run all checks (auto-fix enabled)
158
- vibe check src # Check specific paths
159
- vibe check src public # Check multiple paths
160
- vibe check some/path.ts # Check specific file
161
- vibe check --limit=50 # Limit displayed issues
162
- vibe config-create # Create/update configuration
163
- vibe mcp # Start MCP server
164
- vibe list # List all commands
165
-
166
- # Short versions
167
- v c # Same as: vibe check
168
- v c src # Same as: vibe check src
169
- v cc # Same as: vibe config-create
170
- ```
108
+ **Short aliases** (global install only): `v c` = check, `v cc` = config-create
171
109
 
172
110
  ## Configuration
173
111
 
174
- The `check.config.ts` file controls all behavior:
112
+ Edit `check.config.ts`. Key settings:
175
113
 
176
114
  ```typescript
177
- import type { CheckConfig } from "@next-vibe/checker/system/check/config/types";
178
-
179
- const config: CheckConfig = {
180
- vibeCheck: {
181
- fix: true, // Auto-fix (default: true)
182
- limit: 200, // Max issues to display
183
- timeout: 3600, // Max execution time (seconds)
184
- },
185
-
186
- oxlint: {
187
- enabled: true,
188
- configPath: ".tmp/.oxlintrc.json",
189
- cachePath: ".tmp/oxlint-cache", // Enable caching
190
- },
191
-
192
- eslint: {
193
- enabled: true,
194
- configPath: ".tmp/eslint.config.mjs",
195
- cachePath: ".tmp/eslint-cache", // Enable caching
196
- },
197
-
198
- typecheck: {
199
- enabled: true,
200
- useTsgo: true, // 2-3x faster than tsc
201
- },
115
+ const vibeCheck = {
116
+ fix: true, // Auto-fix enabled by default
117
+ limit: 200, // Max issues per page
118
+ timeout: 3600, // Max execution time (seconds)
119
+ skipEslint: false, // Set to true to disable ESLint
120
+ skipOxlint: false, // Set to true to disable Oxlint
121
+ skipTypecheck: false, // Set to true to skip TypeScript
202
122
  };
203
123
 
204
- export default config;
124
+ const features = {
125
+ pedantic: false, // Set to true for stricter rules
126
+ react: true,
127
+ nextjs: true,
128
+ i18n: true,
129
+ tsgo: true, // ~2-3x faster than tsc
130
+ // ... other feature flags
131
+ };
205
132
  ```
206
133
 
207
- See [check.config.ts](./check.config.ts) for complete example with all options.
134
+ See [check.config.ts](./check.config.ts) for the complete configuration.
208
135
 
209
136
  ## What Gets Checked
210
137
 
211
- ### Oxlint (Rust-powered)
138
+ **Oxlint** (~1-5s) - React, TypeScript, a11y, custom plugins
212
139
 
213
- - 100+ built-in rules for React, TypeScript, a11y
214
- - Custom plugins:
215
- - i18n validation (no hardcoded strings)
216
- - JSX capitalization enforcement
217
- - Restricted syntax (no `throw`, `unknown`, `object` types)
218
- - Promise best practices
219
- - Node.js patterns
220
- - Unicorn modern JS rules
221
- - **Uses cache** for faster subsequent runs
140
+ - 100+ built-in rules
141
+ - i18n validation (no hardcoded strings)
142
+ - JSX capitalization enforcement
143
+ - Restricted syntax (no throw/unknown/any)
222
144
 
223
- ### ESLint (Optional)
145
+ **ESLint** (~1-40s, optional) - Import sorting, React hooks, React compiler rules
224
146
 
225
- - Import/export sorting
226
- - React hooks validation
227
- - React compiler rules
228
- - **Uses cache** for faster subsequent runs
229
- - **Can be disabled** if you don't need these rules (Oxlint covers most cases)
230
- - Only needed for rules not yet supported by Oxlint
147
+ - Disable: Set `skipEslint: true` in config
148
+ - Without it: lose import sorting & React hook checks
231
149
 
232
- ### TypeScript
150
+ **TypeScript** (~0.05-5s) - Full type checking with tsgo
233
151
 
234
- - Full type checking with tsgo or tsc
152
+ - ~2-3x faster than tsc
235
153
  - Strict type rules (optional)
236
154
 
237
- All checks run **in parallel** for maximum speed.
155
+ All run in parallel. Total time ≈ slowest check.
238
156
 
239
157
  ## MCP Server
240
158
 
241
- Configure in `.mcp.json` (created by `vibe config-create`):
159
+ Configure in `.mcp.json`:
242
160
 
243
161
  ```json
244
162
  {
@@ -246,115 +164,94 @@ Configure in `.mcp.json` (created by `vibe config-create`):
246
164
  "vibe": {
247
165
  "command": "npx",
248
166
  "args": ["@next-vibe/checker", "mcp"],
249
- "env": {
250
- "PROJECT_ROOT": "/path/to/your/project"
251
- }
167
+ "env": { "PROJECT_ROOT": "/path/to/project" }
252
168
  }
253
169
  }
254
170
  }
255
171
  ```
256
172
 
257
- The MCP server exposes:
258
-
259
- - `check` - Run comprehensive code quality checks
173
+ Compatible with any MCP-compatible client.
260
174
 
261
- Compatible with any MCP client.
175
+ ## CI/CD Integration
262
176
 
263
- ## Usage in Projects
177
+ ### GitHub Actions
264
178
 
265
- ### With npm Scripts
179
+ ```yaml
180
+ - run: npm install
181
+ - run: npm exec @next-vibe/checker check
182
+ ```
266
183
 
267
- If you selected package.json update during `config-create`:
184
+ ### GitLab CI
268
185
 
269
- ```json
270
- {
271
- "scripts": {
272
- "check": "v c",
273
- "lint": "v c",
274
- "typecheck": "v c"
275
- }
276
- }
186
+ ```yaml
187
+ script:
188
+ - npm install
189
+ - npm exec @next-vibe/checker check
277
190
  ```
278
191
 
279
- The scripts use the short version `v c` (equivalent to `vibe check`).
192
+ ## Caching
280
193
 
281
- Then run:
194
+ Caching is automatic and enabled by default.
282
195
 
283
- ```bash
284
- npm run check
285
- # or
286
- npm run lint
287
- # or
288
- npm run typecheck
289
- ```
196
+ **Speed improvements:**
290
197
 
291
- ### Without Global Install
198
+ - Medium projects: 5.5s → 1.3s **(4x faster)**
199
+ - Large projects: 41s → 4.3s **(10x faster)**
200
+
201
+ **Cache directories:**
292
202
 
293
- ```bash
294
- npx @next-vibe/checker check
203
+ ```
204
+ .tmp/eslint-cache/
205
+ .tmp/typecheck-cache/
295
206
  ```
296
207
 
297
- ## CI/CD Integration
208
+ Clear cache: `rm -rf .tmp/`
298
209
 
299
- ### GitHub Actions
210
+ ## Troubleshooting
300
211
 
301
- ```yaml
302
- name: Code Quality
303
- on: [push, pull_request]
304
-
305
- jobs:
306
- check:
307
- runs-on: ubuntu-latest
308
- steps:
309
- - uses: actions/checkout@v4
310
- - uses: actions/setup-node@v4
311
- - run: npm install
312
- - run: npm run check # Uses "v c" script from package.json
313
- ```
212
+ **Not finding issues?**
314
213
 
315
- ### GitLab CI
214
+ - Enable stricter rules: Set `pedantic: true` in `features`
215
+ - Check that checks aren't disabled (skipEslint, skipOxlint, skipTypecheck)
316
216
 
317
- ```yaml
318
- check:
319
- image: node:18
320
- script:
321
- - npm install
322
- - npm run check # Uses "v c" script from package.json
323
- ```
217
+ **Too slow?**
324
218
 
325
- **Note:** If you didn't add package.json scripts during `config-create`, use `npx @next-vibe/checker check` directly in CI.
219
+ - Disable ESLint: `skipEslint: true`
326
220
 
327
- ## Caching
221
+ **Cache not working?**
222
+
223
+ - Check that `.tmp/` directory is writable
224
+ - Clear and rebuild: `rm -rf .tmp/ && vibe check`
328
225
 
329
- The checker uses caching to speed up subsequent runs:
226
+ **MCP broken?**
330
227
 
331
- - **Oxlint cache**: `.tmp/oxlint-cache`
332
- - **ESLint cache**: `.tmp/eslint-cache`
228
+ - Verify `.mcp.json` in project root
229
+ - Check `PROJECT_ROOT` environment variable
230
+ - Restart Claude/Cursor
333
231
 
334
- Cache directories are created automatically. Add `.tmp/` to your `.gitignore`.
232
+ **Command not found?**
335
233
 
336
- On first run (cold cache), checks are slower. Subsequent runs are significantly faster.
234
+ - If no global install: Add "check": `vibe check` to your `package.json` and use with `npm run check`
235
+ - If globally installed: Ensure npm global bin is in PATH
337
236
 
338
- ## Contributing
237
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for more help.
339
238
 
340
- This project lives on the `vibe-check` branch:
239
+ ## Development
341
240
 
342
241
  ```bash
343
242
  git clone https://github.com/techfreaque/next-vibe.git
344
- cd next-vibe
345
- git checkout vibe-check
346
- bun install
347
- bun vibe check
243
+ cd next-vibe && git checkout vibe-check
244
+ bun install && vibe check --fix
348
245
  ```
349
246
 
350
- See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guidelines.
247
+ See [CONTRIBUTING.md](./CONTRIBUTING.md).
351
248
 
352
249
  ## License
353
250
 
354
- GPL-3.0-only - see [LICENSE](LICENSE)
251
+ GPL-3.0-only
355
252
 
356
253
  ## Links
357
254
 
358
- - [GitHub Repository](https://github.com/techfreaque/next-vibe/tree/vibe-check)
359
- - [npm Package](https://www.npmjs.com/package/@next-vibe/checker)
360
- - [Report Issues](https://github.com/techfreaque/next-vibe/issues)
255
+ - [GitHub](https://github.com/techfreaque/next-vibe/tree/vibe-check)
256
+ - [npm](https://www.npmjs.com/package/@next-vibe/checker)
257
+ - [Issues](https://github.com/techfreaque/next-vibe/issues)