@next-vibe/checker 3.0.5 → 3.0.6
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/AGENTS.md +109 -71
- package/README.md +82 -133
- package/bin/package-runtime.js.map +3 -3
- package/bin/vibe-check.js +7 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -1,90 +1,115 @@
|
|
|
1
1
|
# @next-vibe/checker — Agent Guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## CRITICAL: Use this tool, not tsc/eslint/oxlint directly
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Never run `tsc`, `eslint`, `oxlint`, or `npx tsc` in a shell.** This tool runs all three in parallel, understands your `check.config.ts`, and returns structured results. Shell invocations bypass config, miss pagination, and pollute context.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
| `config` | `cc`, `config-create` | Create/update `check.config.ts` interactively |
|
|
11
|
-
| `help` | `h`, `ai-tools` | List tools or get tool details |
|
|
7
|
+
```sh
|
|
8
|
+
# ✅ CORRECT
|
|
9
|
+
bunx vibe-check c src/
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
# ❌ WRONG — never do these
|
|
12
|
+
npx tsc --noEmit
|
|
13
|
+
eslint src/
|
|
14
|
+
oxlint src/
|
|
15
|
+
```
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
## MCP Setup (run checks without leaving the chat)
|
|
18
|
+
|
|
19
|
+
Add to `.mcp.json` in your project root:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"vibe-check": {
|
|
25
|
+
"command": "bunx",
|
|
26
|
+
"args": ["@next-vibe/checker@latest", "mcp"],
|
|
27
|
+
"env": { "PROJECT_ROOT": "/absolute/path/to/project" }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
21
31
|
```
|
|
22
32
|
|
|
23
|
-
|
|
33
|
+
Then call MCP tool `check` directly — no shell needed.
|
|
24
34
|
|
|
25
|
-
|
|
35
|
+
## Available Tools
|
|
26
36
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
| Command | Alias | What it does |
|
|
38
|
+
| -------- | ----- | -------------------------------------------- |
|
|
39
|
+
| `check` | `c` | Run oxlint + ESLint + TypeScript in parallel |
|
|
40
|
+
| `config` | `cc` | Create/update `check.config.ts` |
|
|
41
|
+
| `help` | `h` | List tools or get full parameter schema |
|
|
30
42
|
|
|
31
|
-
##
|
|
43
|
+
## Run Checks
|
|
32
44
|
|
|
33
45
|
```sh
|
|
34
|
-
vibe-check
|
|
46
|
+
vibe-check c src/ # check src/ directory
|
|
47
|
+
vibe-check c src/ --fix # auto-fix linting issues
|
|
48
|
+
vibe-check c src/ --skip-typecheck # oxlint + ESLint only (fast, no TS)
|
|
49
|
+
vibe-check c src/ --extensive # include test + generated files
|
|
50
|
+
vibe-check c src/components src/utils # multiple paths
|
|
51
|
+
vibe-check c # check entire project (slow)
|
|
35
52
|
```
|
|
36
53
|
|
|
37
|
-
**MCP**:
|
|
54
|
+
**MCP**: `{ "paths": ["src/feature"], "fix": false }`
|
|
38
55
|
|
|
39
|
-
|
|
56
|
+
## Performance (real measurements)
|
|
40
57
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
6. Enable i18n rules?
|
|
47
|
-
7. Enforce JSX capitalization?
|
|
48
|
-
8. Enable pedantic rules?
|
|
49
|
-
9. Restrict throw/unknown/object?
|
|
58
|
+
| Project size | Files | Cold run (no cache) | Warm run (cached TS) |
|
|
59
|
+
| ----------------- | ----- | ------------------- | -------------------- |
|
|
60
|
+
| Small (13 files) | 13 | ~1.2s | ~300ms |
|
|
61
|
+
| Medium (77 files) | 77 | ~4s | ~440ms |
|
|
62
|
+
| Large (8k+ files) | 8k+ | ~25s | ~3s |
|
|
50
63
|
|
|
51
|
-
|
|
64
|
+
TypeScript uses incremental builds (`tsbuildinfo`). First run is slow; subsequent runs on unchanged files are instant. Oxlint and ESLint are always fast — total is gated by TypeScript on cold runs.
|
|
52
65
|
|
|
53
|
-
##
|
|
66
|
+
## Workflow
|
|
67
|
+
|
|
68
|
+
**Quick check during development:**
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
vibe-check c src/feature --skip-typecheck # instant feedback, oxlint+ESLint only
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Full check before committing:**
|
|
54
75
|
|
|
55
76
|
```sh
|
|
56
|
-
vibe-check
|
|
57
|
-
vibe-check help --toolName=config # full schema for config
|
|
58
|
-
vibe-check help --query="typecheck" # search tools
|
|
77
|
+
vibe-check c src/
|
|
59
78
|
```
|
|
60
79
|
|
|
61
|
-
|
|
80
|
+
**Fix everything then verify:**
|
|
62
81
|
|
|
63
|
-
|
|
82
|
+
```sh
|
|
83
|
+
vibe-check c src/ --fix && vibe-check c src/
|
|
84
|
+
```
|
|
64
85
|
|
|
65
|
-
|
|
86
|
+
**First run in a new project (no check.config.ts):**
|
|
66
87
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
88
|
+
```sh
|
|
89
|
+
vibe-check config # interactive setup wizard
|
|
90
|
+
vibe-check c src/ --fix # run and auto-fix
|
|
91
|
+
```
|
|
70
92
|
|
|
71
|
-
|
|
93
|
+
## Create Configuration
|
|
72
94
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
95
|
+
```sh
|
|
96
|
+
vibe-check config # interactive wizard (10 yes/no questions)
|
|
97
|
+
vibe-check config --interactive=false \
|
|
98
|
+
--enableReactRules=true \
|
|
99
|
+
--enableNextjsRules=true # non-interactive (AI/MCP mode)
|
|
100
|
+
```
|
|
76
101
|
|
|
77
|
-
|
|
102
|
+
The wizard asks about your stack: MCP setup, VSCode, package.json scripts, ESLint, React, Next.js, i18n, JSX capitalization, pedantic rules, restricted syntax.
|
|
78
103
|
|
|
79
|
-
|
|
80
|
-
vibe-check c src/ --fix && vibe-check c src/
|
|
81
|
-
```
|
|
104
|
+
**MCP**: Call tool `config` with fields set — non-interactive by default. Missing fields get sensible defaults.
|
|
82
105
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
106
|
+
## Get Tool Help
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
vibe-check help --toolName=check # full schema + all parameters
|
|
110
|
+
vibe-check help --toolName=config # full schema for config wizard
|
|
111
|
+
vibe-check help # list all tools
|
|
112
|
+
```
|
|
88
113
|
|
|
89
114
|
## Understanding Output
|
|
90
115
|
|
|
@@ -99,27 +124,39 @@ When asked to check code quality:
|
|
|
99
124
|
⚠️ Issues: 47
|
|
100
125
|
❌ Errors: 43
|
|
101
126
|
|
|
102
|
-
Overhead 4ms |
|
|
127
|
+
Overhead 4ms | Oxlint 240ms | ESLint 830ms | TypeScript 130ms | Total 900ms
|
|
103
128
|
```
|
|
104
129
|
|
|
105
|
-
|
|
106
|
-
Error codes like `[typescript-eslint(...)]` are ESLint rules.
|
|
107
|
-
Error codes like `[TS2741]` are TypeScript compiler errors.
|
|
130
|
+
Rule code formats:
|
|
108
131
|
|
|
109
|
-
|
|
132
|
+
- `[typescript/no-explicit-any]` → oxlint rule
|
|
133
|
+
- `[typescript-eslint(...)]` → ESLint rule
|
|
134
|
+
- `[TS2741]` → TypeScript compiler error
|
|
110
135
|
|
|
111
|
-
|
|
136
|
+
## check.config.ts Reference
|
|
112
137
|
|
|
113
138
|
```ts
|
|
114
139
|
import type { CheckConfig } from "@next-vibe/checker/system/check/config/types";
|
|
115
140
|
|
|
116
141
|
const config = (): CheckConfig => ({
|
|
117
142
|
vibeCheck: {
|
|
118
|
-
fix: true,
|
|
119
|
-
extensive: false,
|
|
120
|
-
|
|
143
|
+
fix: true,
|
|
144
|
+
extensive: false,
|
|
145
|
+
limit: 20000,
|
|
146
|
+
mcpLimit: 20, // compact output for MCP/AI consumption
|
|
147
|
+
skipEslint: false, // skip ESLint (faster, less thorough)
|
|
148
|
+
skipOxlint: false,
|
|
149
|
+
skipTypecheck: false,
|
|
150
|
+
},
|
|
151
|
+
oxlint: {
|
|
152
|
+
enabled: true,
|
|
153
|
+
plugins: ["typescript", "oxc", "unicorn", "react", "jsx-a11y", "nextjs"],
|
|
154
|
+
jsPlugins: [
|
|
155
|
+
"@next-vibe/checker/oxlint-plugins/restricted-syntax.js",
|
|
156
|
+
],
|
|
157
|
+
categories: { correctness: "error", suspicious: "error" },
|
|
158
|
+
rules: { "typescript/no-explicit-any": "error" },
|
|
121
159
|
},
|
|
122
|
-
oxlint: { enabled: true, rules: { "typescript/no-explicit-any": "error" } },
|
|
123
160
|
typecheck: { enabled: true },
|
|
124
161
|
eslint: { enabled: true, buildFlatConfig: (rc, hooks, importSort) => [...] },
|
|
125
162
|
prettier: { enabled: true },
|
|
@@ -131,9 +168,10 @@ export default config;
|
|
|
131
168
|
|
|
132
169
|
Full type definitions: `@next-vibe/checker/system/check/config/types`
|
|
133
170
|
|
|
134
|
-
## Source
|
|
171
|
+
## Source Files (for understanding internals)
|
|
135
172
|
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
173
|
+
- `src/vibe-check/definition.ts` — check endpoint schema + all parameters
|
|
174
|
+
- `src/vibe-check/repository.ts` — check implementation
|
|
175
|
+
- `src/config/create/definition.ts` — config wizard schema
|
|
176
|
+
- `system/check/config/types.ts` — CheckConfig TypeScript types
|
|
177
|
+
- `oxlint-plugins/` — compiled custom oxlint plugins
|
package/README.md
CHANGED
|
@@ -8,33 +8,58 @@ The same checker that powers [unbottled.ai](https://unbottled.ai) and the next-v
|
|
|
8
8
|
|
|
9
9
|
- **One command instead of three** — `vibe-check` replaces separate `oxlint`, `eslint`, and `tsc` invocations
|
|
10
10
|
- **Parallel execution** — all three tools run simultaneously; total time is the slowest, not the sum
|
|
11
|
-
- **AI-native** — ships as an MCP server so your AI assistant can run checks directly
|
|
11
|
+
- **AI-native** — ships as an MCP server so your AI assistant can run checks directly without shell access
|
|
12
|
+
|
|
13
|
+
## MCP Setup — AI-First Workflow
|
|
14
|
+
|
|
15
|
+
Add `vibe-check` as an MCP server and your AI assistant runs checks directly — no copy-pasting terminal output.
|
|
16
|
+
|
|
17
|
+
**`.mcp.json` in your project root (Claude Code, Cursor, Windsurf):**
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"vibe-check": {
|
|
23
|
+
"command": "bunx",
|
|
24
|
+
"args": ["@next-vibe/checker@latest", "mcp"],
|
|
25
|
+
"env": {
|
|
26
|
+
"PROJECT_ROOT": "/absolute/path/to/your/project"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The MCP server exposes two tools your AI uses directly:
|
|
34
|
+
|
|
35
|
+
- **`check`** — run oxlint + ESLint + TypeScript, returns structured results
|
|
36
|
+
- **`config`** — create or update `check.config.ts` non-interactively
|
|
37
|
+
|
|
38
|
+
With `AGENTS.md` in the package, agents know to call `check` instead of running `tsc` or `eslint` in a shell — which means faster feedback, no output truncation, and proper pagination.
|
|
12
39
|
|
|
13
40
|
## Performance
|
|
14
41
|
|
|
15
|
-
All three tools run in parallel.
|
|
42
|
+
All three tools run in parallel. TypeScript uses incremental builds (`tsbuildinfo`) for fast repeat runs.
|
|
16
43
|
|
|
17
|
-
| Project
|
|
18
|
-
|
|
19
|
-
| Small
|
|
20
|
-
| Medium (Next.js
|
|
21
|
-
| Large (monorepo)
|
|
44
|
+
| Project size | Files | Cold (no cache) | Warm (cached TS) |
|
|
45
|
+
|------------------|-------|-----------------|------------------|
|
|
46
|
+
| Small | 13 | ~1.2s | ~300ms |
|
|
47
|
+
| Medium (Next.js) | 77 | ~4s | ~440ms |
|
|
48
|
+
| Large (monorepo) | 8k+ | ~25s | ~3s |
|
|
22
49
|
|
|
23
|
-
|
|
50
|
+
Cold = first run or after `tsbuildinfo` cleared. Warm = subsequent runs on unchanged files.
|
|
24
51
|
|
|
25
52
|
## Quick Start — AI-Assisted Setup (Recommended)
|
|
26
53
|
|
|
27
|
-
|
|
54
|
+
Copy this into Claude Code, Cursor, or any agent with tool access:
|
|
28
55
|
|
|
29
56
|
```
|
|
30
|
-
Help me set up @next-vibe/checker
|
|
31
|
-
(oxlint + ESLint + TypeScript type checking in parallel).
|
|
57
|
+
Help me set up @next-vibe/checker for this project.
|
|
32
58
|
|
|
33
|
-
1.
|
|
34
|
-
- Read package.json
|
|
35
|
-
|
|
36
|
-
- Count .ts/.tsx files in src/
|
|
37
|
-
- Check if there's already a check.config.ts.
|
|
59
|
+
1. Check my project:
|
|
60
|
+
- Read package.json (package manager? existing lint: biome/eslint/tsc?)
|
|
61
|
+
- Check for existing config files (.eslintrc, biome.json, eslint.config.mjs, check.config.ts)
|
|
62
|
+
- Count .ts/.tsx files in src/
|
|
38
63
|
|
|
39
64
|
2. Install:
|
|
40
65
|
bun add -D @next-vibe/checker oxlint eslint typescript \
|
|
@@ -43,44 +68,36 @@ Help me set up @next-vibe/checker — a unified TypeScript code quality tool
|
|
|
43
68
|
|
|
44
69
|
3. Run the interactive config wizard:
|
|
45
70
|
bunx vibe-check config
|
|
46
|
-
Answer based on my stack
|
|
71
|
+
(Answer based on my stack: React? Next.js? i18n? strict types?)
|
|
47
72
|
|
|
48
|
-
4. Run a full check
|
|
49
|
-
bunx vibe-check
|
|
50
|
-
Then: bunx vibe-check (full check)
|
|
73
|
+
4. Run a full check WITHOUT fixing — show me ALL issues first:
|
|
74
|
+
bunx vibe-check c src/
|
|
51
75
|
|
|
52
|
-
5.
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
76
|
+
5. Ask me:
|
|
77
|
+
- How many issues? Are they real problems or noise?
|
|
78
|
+
- Should we enable --extensive to also check test/generated files?
|
|
79
|
+
- Enable strict mode (no throw, no any, no unknown)?
|
|
56
80
|
|
|
57
|
-
6.
|
|
58
|
-
bunx vibe-check --fix
|
|
81
|
+
6. Auto-fix safe issues:
|
|
82
|
+
bunx vibe-check c src/ --fix
|
|
59
83
|
|
|
60
|
-
7.
|
|
61
|
-
"check": "vibe-check",
|
|
62
|
-
"lint": "vibe-check --fix",
|
|
63
|
-
"typecheck": "vibe-check --skip-oxlint --skip-eslint"
|
|
64
|
-
|
|
65
|
-
8. Add the MCP server to .mcp.json so you can run checks from this chat:
|
|
84
|
+
7. Add MCP server to .mcp.json so you can run checks from this chat:
|
|
66
85
|
{
|
|
67
86
|
"mcpServers": {
|
|
68
87
|
"vibe-check": {
|
|
69
88
|
"command": "bunx",
|
|
70
|
-
"args": ["vibe
|
|
71
|
-
"env": { "PROJECT_ROOT": "<absolute path>" }
|
|
89
|
+
"args": ["@next-vibe/checker@latest", "mcp"],
|
|
90
|
+
"env": { "PROJECT_ROOT": "<absolute path to my project>" }
|
|
72
91
|
}
|
|
73
92
|
}
|
|
74
93
|
}
|
|
75
94
|
|
|
76
|
-
|
|
95
|
+
8. If I had biome/standalone eslint configs, remove them.
|
|
77
96
|
|
|
78
97
|
My project: [INSERT ABSOLUTE PATH]
|
|
79
|
-
Package manager: [bun / npm / pnpm
|
|
98
|
+
Package manager: [bun / npm / pnpm]
|
|
80
99
|
```
|
|
81
100
|
|
|
82
|
-
This gives you a fully configured, AI-runnable setup in ~5 minutes. The agent will show you what issues exist before fixing anything, so you can decide how strict to go.
|
|
83
|
-
|
|
84
101
|
## Quick Start — Manual
|
|
85
102
|
|
|
86
103
|
```sh
|
|
@@ -115,7 +132,7 @@ bun add -D oxlint eslint typescript \
|
|
|
115
132
|
```
|
|
116
133
|
|
|
117
134
|
| Package | Version | Purpose |
|
|
118
|
-
|
|
135
|
+
|------------------------------------|------------|-----------------------------|
|
|
119
136
|
| `oxlint` | `>=1.0.0` | Fast Rust-based linter |
|
|
120
137
|
| `eslint` | `>=9.0.0` | Import sorting, React hooks |
|
|
121
138
|
| `typescript` | `>=5.0.0` | Type checking |
|
|
@@ -129,107 +146,54 @@ bun add -D oxlint eslint typescript \
|
|
|
129
146
|
```sh
|
|
130
147
|
vibe-check [paths...] # Run all checks (oxlint + ESLint + TypeScript)
|
|
131
148
|
vibe-check --fix # Auto-fix linting issues
|
|
132
|
-
vibe-check --skip-eslint # Skip ESLint
|
|
149
|
+
vibe-check --skip-eslint # Skip ESLint (faster)
|
|
133
150
|
vibe-check --skip-oxlint # Skip oxlint
|
|
134
|
-
vibe-check --skip-typecheck # Skip TypeScript
|
|
151
|
+
vibe-check --skip-typecheck # Skip TypeScript type checking
|
|
135
152
|
vibe-check --extensive # Include test/generated files
|
|
136
153
|
vibe-check --timeout=60 # Timeout in seconds (default: 3600)
|
|
137
154
|
vibe-check --limit=100 # Max issues to display (default: 20000)
|
|
138
155
|
vibe-check config # Create check.config.ts interactively
|
|
139
156
|
vibe-check mcp # Start MCP server
|
|
157
|
+
vibe-check help # List all commands and parameters
|
|
140
158
|
```
|
|
141
159
|
|
|
142
|
-
## MCP Server
|
|
143
|
-
|
|
144
|
-
Add `vibe-check` as an MCP server and your AI assistant can run checks directly — no copy-pasting output.
|
|
145
|
-
|
|
146
|
-
### Claude Code (`.mcp.json` in project root)
|
|
147
|
-
|
|
148
|
-
```json
|
|
149
|
-
{
|
|
150
|
-
"mcpServers": {
|
|
151
|
-
"vibe-check": {
|
|
152
|
-
"command": "bunx",
|
|
153
|
-
"args": ["vibe-check", "mcp"],
|
|
154
|
-
"env": {
|
|
155
|
-
"PROJECT_ROOT": "/absolute/path/to/your/project"
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### Claude Desktop (`config.json`)
|
|
163
|
-
|
|
164
|
-
```json
|
|
165
|
-
{
|
|
166
|
-
"mcpServers": {
|
|
167
|
-
"vibe-check": {
|
|
168
|
-
"command": "bunx",
|
|
169
|
-
"args": ["vibe-check", "mcp"],
|
|
170
|
-
"env": {
|
|
171
|
-
"PROJECT_ROOT": "/absolute/path/to/your/project"
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
The MCP server exposes two tools:
|
|
179
|
-
|
|
180
|
-
- **`check`** — run oxlint + ESLint + TypeScript, returns structured results
|
|
181
|
-
- **`config-create`** — create or update `check.config.ts`
|
|
182
|
-
|
|
183
160
|
## Configuration
|
|
184
161
|
|
|
185
|
-
Run `vibe-check config` to scaffold a `check.config.ts` with an interactive wizard. The wizard asks about your stack (React, Next.js, i18n) and generates a
|
|
162
|
+
Run `vibe-check config` to scaffold a `check.config.ts` with an interactive wizard. The wizard asks about your stack (React, Next.js, i18n, strict types) and generates a tailored config.
|
|
186
163
|
|
|
187
164
|
```ts
|
|
188
|
-
import type {
|
|
189
|
-
CheckConfig,
|
|
190
|
-
EslintFlatConfigItem,
|
|
191
|
-
EslintParser,
|
|
192
|
-
EslintPluginLike,
|
|
193
|
-
} from "@next-vibe/checker/system/check/config/types";
|
|
165
|
+
import type { CheckConfig } from "@next-vibe/checker/system/check/config/types";
|
|
194
166
|
|
|
195
167
|
const config = (): CheckConfig => ({
|
|
196
168
|
vibeCheck: {
|
|
197
169
|
fix: true,
|
|
198
170
|
timeout: 3600,
|
|
199
171
|
limit: 20000,
|
|
200
|
-
mcpLimit: 20,
|
|
201
|
-
extensive: false,
|
|
172
|
+
mcpLimit: 20, // compact output for AI/MCP consumption
|
|
173
|
+
extensive: false, // true to include test/generated files
|
|
174
|
+
skipEslint: false, // skip ESLint for maximum speed
|
|
175
|
+
skipTypecheck: false,
|
|
202
176
|
},
|
|
203
177
|
oxlint: {
|
|
204
178
|
enabled: true,
|
|
205
179
|
plugins: ["typescript", "oxc", "unicorn", "react", "jsx-a11y", "nextjs"],
|
|
206
180
|
jsPlugins: [
|
|
207
|
-
"@next-vibe/checker/oxlint-plugins/restricted-syntax",
|
|
208
|
-
"@next-vibe/checker/oxlint-plugins/jsx-capitalization",
|
|
209
|
-
"@next-vibe/checker/oxlint-plugins/i18n",
|
|
181
|
+
"@next-vibe/checker/oxlint-plugins/restricted-syntax.js",
|
|
210
182
|
],
|
|
211
183
|
categories: { correctness: "error", suspicious: "error" },
|
|
212
|
-
rules: {
|
|
213
|
-
"typescript/no-explicit-any": "error",
|
|
214
|
-
},
|
|
184
|
+
rules: { "typescript/no-explicit-any": "error" },
|
|
215
185
|
},
|
|
216
|
-
typecheck: { enabled: true
|
|
186
|
+
typecheck: { enabled: true },
|
|
217
187
|
eslint: {
|
|
218
188
|
enabled: true,
|
|
219
|
-
buildFlatConfig(rc, hooks, importSort
|
|
220
|
-
return [
|
|
221
|
-
{
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
"react-compiler": rc,
|
|
226
|
-
},
|
|
227
|
-
rules: {
|
|
228
|
-
"simple-import-sort/imports": "error",
|
|
229
|
-
"react-hooks/rules-of-hooks": "error",
|
|
230
|
-
},
|
|
189
|
+
buildFlatConfig(rc, hooks, importSort): EslintFlatConfigItem[] {
|
|
190
|
+
return [{
|
|
191
|
+
plugins: { "simple-import-sort": importSort, "react-hooks": hooks },
|
|
192
|
+
rules: {
|
|
193
|
+
"simple-import-sort/imports": "error",
|
|
194
|
+
"react-hooks/rules-of-hooks": "error",
|
|
231
195
|
},
|
|
232
|
-
];
|
|
196
|
+
}];
|
|
233
197
|
},
|
|
234
198
|
},
|
|
235
199
|
prettier: { enabled: true, singleQuote: false, trailingComma: "all" },
|
|
@@ -241,10 +205,8 @@ export default config;
|
|
|
241
205
|
|
|
242
206
|
### Feature Flags
|
|
243
207
|
|
|
244
|
-
The scaffolded `check.config.ts` includes feature flags for easy toggling:
|
|
245
|
-
|
|
246
208
|
| Flag | Default | What it enables |
|
|
247
|
-
|
|
209
|
+
|---------------------|---------|---------------------------------------------|
|
|
248
210
|
| `react` | `true` | React-specific oxlint rules |
|
|
249
211
|
| `nextjs` | `true` | Next.js-specific rules |
|
|
250
212
|
| `i18n` | `true` | i18n string literal checks |
|
|
@@ -255,41 +217,28 @@ The scaffolded `check.config.ts` includes feature flags for easy toggling:
|
|
|
255
217
|
|
|
256
218
|
### Custom Oxlint Plugins
|
|
257
219
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
|
261
|
-
|
|
|
262
|
-
| `@next-vibe/checker/oxlint-plugins/
|
|
263
|
-
| `@next-vibe/checker/oxlint-plugins/jsx-capitalization` | Enforces uppercase JSX component names |
|
|
264
|
-
| `@next-vibe/checker/oxlint-plugins/i18n` | Catches untranslated literal strings in JSX |
|
|
220
|
+
| Plugin | What it checks |
|
|
221
|
+
|----------------------------------------------------------|----------------------------------------------|
|
|
222
|
+
| `@next-vibe/checker/oxlint-plugins/restricted-syntax.js` | Bans `throw`, `unknown`, bare `object` types |
|
|
223
|
+
| `@next-vibe/checker/oxlint-plugins/jsx-capitalization.js`| Enforces uppercase JSX component names |
|
|
224
|
+
| `@next-vibe/checker/oxlint-plugins/i18n.js` | Catches untranslated literal strings in JSX |
|
|
265
225
|
|
|
266
226
|
You can also write your own oxlint JS plugins and reference them by path in `jsPlugins`.
|
|
267
227
|
|
|
268
|
-
### Extensive Mode
|
|
269
|
-
|
|
270
|
-
By default, `**/generated/**`, `**/*.test.ts`, and `**/*.test.tsx` are excluded. Pass `--extensive` or set `vibeCheck.extensive: true` to include them — useful for release validation.
|
|
271
|
-
|
|
272
228
|
### VSCode Integration
|
|
273
229
|
|
|
274
230
|
Set `vscode.enabled: true` and `vscode.autoGenerateSettings: true`. On each run, `vibe-check` writes `.vscode/settings.json` with oxlint, formatter, and TypeScript settings pre-configured.
|
|
275
231
|
|
|
276
232
|
## Migrating from Biome
|
|
277
233
|
|
|
278
|
-
Biome handles formatting + some linting. `vibe-check` covers linting + type checking (use Prettier separately, or enable `prettier` in config).
|
|
279
|
-
|
|
280
234
|
```sh
|
|
281
|
-
# Remove biome
|
|
282
235
|
bun remove @biomejs/biome
|
|
283
236
|
|
|
284
|
-
# Install vibe-check + peers
|
|
285
237
|
bun add -D @next-vibe/checker oxlint eslint typescript \
|
|
286
238
|
eslint-plugin-react-compiler eslint-plugin-react-hooks \
|
|
287
239
|
eslint-plugin-simple-import-sort typescript-eslint
|
|
288
240
|
|
|
289
|
-
|
|
290
|
-
bunx vibe-check config
|
|
291
|
-
|
|
292
|
-
# First run (auto-fix)
|
|
241
|
+
bunx vibe-check config # say 'no' to i18n/jsx-cap unless needed
|
|
293
242
|
bunx vibe-check --fix
|
|
294
243
|
```
|
|
295
244
|
|