@geoql/vue-doctor 0.1.0-alpha.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vinayak Kulkarni
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # `@geoql/vue-doctor`
2
+
3
+ > Your agent writes bad Vue. This catches it.
4
+
5
+ CLI auditor for Vue 3 apps. Detects anti-patterns, AI-slop, and best-practice violations via a hybrid pass over `@vue/compiler-sfc` template ASTs and `oxlint` (with its built-in `vue` plugin) for script-level rules.
6
+
7
+ ## Quickstart
8
+
9
+ ```bash
10
+ npx -y @geoql/vue-doctor ./src
11
+ ```
12
+
13
+ ## CLI
14
+
15
+ ```
16
+ vue-doctor [path] [--format text|json] [--config doctor.config.ts] [--fail-on error|warning]
17
+ ```
18
+
19
+ | Flag | Description |
20
+ | ----------- | -------------------------------------------------------------------------- |
21
+ | `--format` | `text` (default) or `json` |
22
+ | `--config` | Path to `doctor.config.ts`. Defaults to `./doctor.config.ts` if it exists. |
23
+ | `--fail-on` | `error` (default) or `warning` — threshold for non-zero exit code. |
24
+
25
+ Exit codes:
26
+
27
+ | Code | Meaning |
28
+ | ---- | ------------------------------------------------------------ |
29
+ | 0 | No findings at/above `--fail-on` threshold (default: error). |
30
+ | 1 | Findings at/above threshold. |
31
+ | 2 | Configuration error or scan failure. |
32
+
33
+ ## Architecture
34
+
35
+ See [`docs/ARCHITECTURE.md`](../../docs/ARCHITECTURE.md).
36
+
37
+ ## License
38
+
39
+ MIT © Vinayak Kulkarni
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { run } from '../dist/index.js';
3
+ const code = await run(process.argv);
4
+ process.exit(code);
@@ -0,0 +1,5 @@
1
+ //#region src/cli.d.ts
2
+ declare function run(argv?: string[]): Promise<number>;
3
+ //#endregion
4
+ export { run };
5
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js ADDED
@@ -0,0 +1,44 @@
1
+ import { resolve } from "node:path";
2
+ import process from "node:process";
3
+ import { audit, format, loadAuditConfig } from "@geoql/doctor-core";
4
+ import { cac } from "cac";
5
+ //#region src/cli.ts
6
+ function isReporter(v) {
7
+ return v === "text" || v === "json";
8
+ }
9
+ function isSeverity(v) {
10
+ return v === "error" || v === "warning";
11
+ }
12
+ async function run(argv = process.argv) {
13
+ const cli = cac("vue-doctor");
14
+ cli.command("[path]", "Audit a Vue project").option("--format <kind>", "Output format (text|json)", { default: "text" }).option("--config <path>", "Path to doctor.config.ts").option("--fail-on <level>", "Exit non-zero on this severity or worse (error|warning)", { default: "error" }).action(async (path, flags) => {
15
+ const reporter = flags.format && isReporter(flags.format) ? flags.format : "text";
16
+ const failOn = flags.failOn && isSeverity(flags.failOn) ? flags.failOn : "error";
17
+ const rootDir = resolve(path ?? ".");
18
+ try {
19
+ const { config } = await loadAuditConfig(rootDir, flags.config);
20
+ const report = await audit({
21
+ ...config,
22
+ rootDir,
23
+ failOn
24
+ });
25
+ const out = format(report, reporter);
26
+ process.stdout.write(out);
27
+ process.stdout.write("\n");
28
+ process.exitCode = report.exitCode;
29
+ } catch (err) {
30
+ const msg = err instanceof Error ? err.message : String(err);
31
+ process.stderr.write(`vue-doctor: ${msg}\n`);
32
+ process.exitCode = 2;
33
+ }
34
+ });
35
+ cli.help();
36
+ cli.version("0.0.0");
37
+ cli.parse(argv, { run: false });
38
+ await cli.runMatchedCommand();
39
+ return process.exitCode ?? 0;
40
+ }
41
+ //#endregion
42
+ export { run };
43
+
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import { resolve } from 'node:path';\nimport process from 'node:process';\nimport {\n audit,\n format,\n loadAuditConfig,\n type ReporterFormat,\n} from '@geoql/doctor-core';\nimport { cac } from 'cac';\n\ninterface CliFlags {\n format?: string;\n config?: string;\n failOn?: string;\n}\n\nfunction isReporter(v: string): v is ReporterFormat {\n return v === 'text' || v === 'json';\n}\n\nfunction isSeverity(v: string): v is 'error' | 'warning' {\n return v === 'error' || v === 'warning';\n}\n\nexport async function run(argv: string[] = process.argv): Promise<number> {\n const cli = cac('vue-doctor');\n\n cli\n .command('[path]', 'Audit a Vue project')\n .option('--format <kind>', 'Output format (text|json)', { default: 'text' })\n .option('--config <path>', 'Path to doctor.config.ts')\n .option(\n '--fail-on <level>',\n 'Exit non-zero on this severity or worse (error|warning)',\n {\n default: 'error',\n },\n )\n .action(async (path: string | undefined, flags: CliFlags) => {\n const reporter =\n flags.format && isReporter(flags.format) ? flags.format : 'text';\n const failOn =\n flags.failOn && isSeverity(flags.failOn) ? flags.failOn : 'error';\n const rootDir = resolve(path ?? '.');\n\n try {\n const { config } = await loadAuditConfig(rootDir, flags.config);\n const report = await audit({ ...config, rootDir, failOn });\n const out = format(report, reporter);\n process.stdout.write(out);\n process.stdout.write('\\n');\n process.exitCode = report.exitCode;\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n process.stderr.write(`vue-doctor: ${msg}\\n`);\n process.exitCode = 2;\n }\n });\n\n cli.help();\n cli.version('0.0.0');\n cli.parse(argv, { run: false });\n await cli.runMatchedCommand();\n return process.exitCode ?? 0;\n}\n"],"mappings":";;;;;AAgBA,SAAS,WAAW,GAAgC;CAClD,OAAO,MAAM,UAAU,MAAM;;AAG/B,SAAS,WAAW,GAAqC;CACvD,OAAO,MAAM,WAAW,MAAM;;AAGhC,eAAsB,IAAI,OAAiB,QAAQ,MAAuB;CACxE,MAAM,MAAM,IAAI,aAAa;CAE7B,IACG,QAAQ,UAAU,sBAAsB,CACxC,OAAO,mBAAmB,6BAA6B,EAAE,SAAS,QAAQ,CAAC,CAC3E,OAAO,mBAAmB,2BAA2B,CACrD,OACC,qBACA,2DACA,EACE,SAAS,SACV,CACF,CACA,OAAO,OAAO,MAA0B,UAAoB;EAC3D,MAAM,WACJ,MAAM,UAAU,WAAW,MAAM,OAAO,GAAG,MAAM,SAAS;EAC5D,MAAM,SACJ,MAAM,UAAU,WAAW,MAAM,OAAO,GAAG,MAAM,SAAS;EAC5D,MAAM,UAAU,QAAQ,QAAQ,IAAI;EAEpC,IAAI;GACF,MAAM,EAAE,WAAW,MAAM,gBAAgB,SAAS,MAAM,OAAO;GAC/D,MAAM,SAAS,MAAM,MAAM;IAAE,GAAG;IAAQ;IAAS;IAAQ,CAAC;GAC1D,MAAM,MAAM,OAAO,QAAQ,SAAS;GACpC,QAAQ,OAAO,MAAM,IAAI;GACzB,QAAQ,OAAO,MAAM,KAAK;GAC1B,QAAQ,WAAW,OAAO;WACnB,KAAK;GACZ,MAAM,MAAM,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI;GAC5D,QAAQ,OAAO,MAAM,eAAe,IAAI,IAAI;GAC5C,QAAQ,WAAW;;GAErB;CAEJ,IAAI,MAAM;CACV,IAAI,QAAQ,QAAQ;CACpB,IAAI,MAAM,MAAM,EAAE,KAAK,OAAO,CAAC;CAC/B,MAAM,IAAI,mBAAmB;CAC7B,OAAO,QAAQ,YAAY"}
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@geoql/vue-doctor",
3
+ "version": "0.1.0-alpha.0",
4
+ "private": false,
5
+ "description": "CLI auditor for Vue 3 apps. Detects anti-patterns, AI-slop, and best-practice violations via @vue/compiler-sfc + oxlint. Run with `npx -y @geoql/vue-doctor`.",
6
+ "keywords": [
7
+ "audit",
8
+ "cli",
9
+ "doctor",
10
+ "geoql",
11
+ "lint",
12
+ "oxlint",
13
+ "vue",
14
+ "vue3"
15
+ ],
16
+ "homepage": "https://github.com/geoql/doctor#readme",
17
+ "bugs": {
18
+ "url": "https://github.com/geoql/doctor/issues"
19
+ },
20
+ "license": "MIT",
21
+ "author": {
22
+ "name": "Vinayak Kulkarni",
23
+ "email": "inbox.vinayak@gmail.com",
24
+ "url": "https://vinayakkulkarni.dev"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/geoql/doctor.git",
29
+ "directory": "packages/vue-doctor"
30
+ },
31
+ "bin": {
32
+ "vue-doctor": "./bin/vue-doctor.mjs"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "bin"
37
+ ],
38
+ "type": "module",
39
+ "exports": {
40
+ ".": {
41
+ "import": "./dist/index.js",
42
+ "types": "./dist/index.d.ts"
43
+ }
44
+ },
45
+ "dependencies": {
46
+ "cac": "^7.0.0",
47
+ "kolorist": "^1.8.0",
48
+ "oxlint": "^1.67.0",
49
+ "@geoql/doctor-core": "^0.1.0-alpha.0",
50
+ "@geoql/oxlint-plugin-vue-doctor": "0.1.0-alpha.0"
51
+ },
52
+ "devDependencies": {
53
+ "@types/node": "^25.9.1",
54
+ "typescript": "^6.0.3",
55
+ "vitest": "^4.1.7"
56
+ },
57
+ "publishConfig": {
58
+ "access": "public"
59
+ },
60
+ "scripts": {
61
+ "lint": "vp lint src",
62
+ "lint:fix": "vp lint src --fix",
63
+ "format": "vp fmt",
64
+ "format:check": "vp fmt --check",
65
+ "build": "vp pack",
66
+ "test": "vitest run"
67
+ }
68
+ }