{"id":48109987,"url":"https://github.com/zhyt1985/vue-health","last_synced_at":"2026-04-04T16:02:46.013Z","repository":{"id":339214773,"uuid":"1160956911","full_name":"zhyt1985/vue-health","owner":"zhyt1985","description":"Diagnose and fix performance issues in your Vue app","archived":false,"fork":false,"pushed_at":"2026-02-19T18:35:59.000Z","size":95,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-19T21:33:36.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhyt1985.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-18T15:14:40.000Z","updated_at":"2026-02-19T18:36:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zhyt1985/vue-health","commit_stats":null,"previous_names":["zhyt1985/vue-doctor","zhyt1985/vue-health"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zhyt1985/vue-health","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyt1985%2Fvue-health","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyt1985%2Fvue-health/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyt1985%2Fvue-health/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyt1985%2Fvue-health/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhyt1985","download_url":"https://codeload.github.com/zhyt1985/vue-health/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyt1985%2Fvue-health/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31405225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T16:02:22.213Z","updated_at":"2026-04-04T16:02:45.981Z","avatar_url":"https://github.com/zhyt1985.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-health\n\nEnglish | [中文](./README.zh-CN.md)\n\nOne command to diagnose your Vue codebase health.\n\n```bash\nnpx vue-health .\n```\n\n```\nvue-health v2.1.0\n\n  Nuxt (Vue ^3.5.0) · 128 source files\n\n✔ Found 12 lint issues\n✔ Found 3 dead code issues\n\n ✗ Mutating props directly\n    Use `emit('update:propName', newValue)` or a local data copy\n\n ⚠ Unused component (3)\n    Remove the unused component import or use it in the template\n\n ⚠ Using v-if with v-for (2)\n    Move v-if to a wrapper element or use computed to filter the list\n\n────────────────────────────────────────\n\n  ( ◕‿◕)  Vue Doctor — my-app\n\n  Score: 87/100 Good\n  ███████████████████████████████████████████░░░░░░░\n\n  Framework: Nuxt · Vue: ^3.5.0 · Issues: 15 · Time: 1.2s\n```\n\n## Features\n\n- **Fast** — powered by [oxlint](https://oxc.rs) (Rust), not ESLint\n- **40+ Vue rules** — correctness, performance, security, dead code\n- **Zero config** — auto-detects Nuxt / Vite / Vue CLI / Quasar\n- **Dead code detection** — unused files, exports, and types via [knip](https://knip.dev)\n- **Diff mode** — only scan changed files on your branch\n- **Monorepo support** — select which workspace projects to scan\n- **Programmable** — `import { diagnose } from \"vue-health/api\"`\n\n## Claude Code Skill\n\nvue-health also provides a [Claude Code](https://claude.ai/code) Skill, allowing you to diagnose Vue project health directly within Claude Code.\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/zhyt1985/vue-health.git ~/vue-health\n\n# Copy the skill to Claude's global skills directory\ncp -r ~/vue-health/skills/vue-health ~/.claude/skills/\n```\n\n### Usage\n\nIn Claude Code, simply ask:\n\n```\nCheck the health of this Vue project\n```\n\nFor more details, see [Skill Documentation](https://github.com/zhyt1985/vue-health/tree/main/skills/vue-health).\n\n## Install\n\n```bash\n# Run directly (no install needed)\nnpx vue-health .\n\n# Or install globally\nnpm i -g vue-health\n```\n\nRequires Node.js \u003e= 20.\n\n## CLI\n\n```\nUsage: vue-health [options] [directory]\n\nArguments:\n  directory          project directory to scan (default: \".\")\n\nOptions:\n  -v, --version      display the version number\n  --no-lint          skip linting\n  --no-dead-code     skip dead code detection\n  --verbose          show file details per rule\n  --score            output only the score\n  -y, --yes          skip prompts, scan all workspace projects\n  --project \u003cnames\u003e  select workspace project (comma-separated)\n  --diff [base]      scan only files changed vs base branch\n  -h, --help         display help for command\n```\n\n### Examples\n\n```bash\n# Scan current directory\nvue-health .\n\n# Only show the score (useful in CI)\nvue-health . --score\n\n# Scan only changed files vs main\nvue-health . --diff\n\n# Scan with file-level details\nvue-health . --verbose\n\n# Skip dead code detection\nvue-health . --no-dead-code\n\n# Scan a specific workspace project\nvue-health . --project my-app\n```\n\n## Node.js API\n\n```ts\nimport { diagnose } from \"vue-health/api\";\n\nconst { diagnostics, score } = await diagnose(\"./my-vue-app\");\n\nconsole.log(score);\n// { score: 87, label: \"Good\" }\n\nconsole.log(diagnostics[0]);\n// {\n//   filePath: \"src/components/Foo.vue\",\n//   rule: \"no-mutating-props\",\n//   severity: \"error\",\n//   message: \"Mutating props directly\",\n//   help: \"Use emit('update:propName', newValue) or a local data copy\",\n//   category: \"Correctness\",\n//   line: 42,\n//   column: 5\n// }\n```\n\n## Rules\n\n### Correctness\n\n| Rule | Description |\n|------|-------------|\n| `no-mutating-props` | Don't mutate props directly |\n| `no-ref-as-operand` | Use `.value` to access refs in script |\n| `no-setup-props-reactivity-loss` | Maintain reactivity when destructuring props |\n| `no-side-effects-in-computed-properties` | Computed properties should be pure |\n| `no-async-in-computed-properties` | No async in computed — use watchers |\n| `no-lifecycle-after-await` | Lifecycle hooks must be before `await` in setup |\n| `no-watch-after-await` | `watch()` must be before `await` in setup |\n| `no-shared-component-data` | `data()` must return a fresh object |\n| `no-dupe-keys` | No duplicate keys across data/computed/methods |\n| `return-in-computed-property` | Computed properties must return a value |\n| `valid-v-model` | v-model needs a writable expression |\n| `valid-v-for` / `valid-v-if` / `valid-v-on` / `valid-v-bind` / `valid-v-slot` | Template directive validation |\n| `require-v-for-key` | `:key` is required on v-for elements |\n| ... | 40+ rules total |\n\n### Performance\n\n| Rule | Description |\n|------|-------------|\n| `no-use-v-if-with-v-for` | Don't use v-if and v-for on the same element |\n\n### Security\n\n| Rule | Description |\n|------|-------------|\n| `no-v-html` | `v-html` can lead to XSS — sanitize or use interpolation |\n\n### Dead Code (via knip)\n\n| Rule | Description |\n|------|-------------|\n| `no-unused-components` | Remove unused component imports |\n| `no-unused-vars` | Remove unused variables |\n| Unused files | Files not imported anywhere |\n| Unused exports / types | Exported symbols never consumed |\n\n## Scoring\n\nScore is 0–100, calculated from diagnostic count and severity:\n\n| Range | Label | Indicator |\n|-------|-------|-----------|\n| 75–100 | Good | `( ◕‿◕)` |\n| 50–74 | OK | `( ◑‿◑)` |\n| 0–49 | Needs Work | `( ◉_◉)` |\n\nErrors weigh 3x more than warnings.\n\n## Configuration\n\nCreate `.vue-healthrc` or `.vue-healthrc.json` in your project root:\n\n```json\n{\n  \"lint\": true,\n  \"deadCode\": true,\n  \"verbose\": false,\n  \"diff\": false,\n  \"ignore\": {\n    \"rules\": [\"no-v-html\"],\n    \"files\": [\"src/legacy/**\"]\n  }\n}\n```\n\n## Supported Frameworks\n\nAuto-detected from `package.json` or config files:\n\n- **Nuxt** — `nuxt.config.ts`\n- **Vite** — `vite.config.ts`\n- **Vue CLI** — `vue.config.js`\n- **Quasar** — `@quasar/app-vite` or `@quasar/app-webpack`\n\nAlso detects TypeScript (`tsconfig.json`) and Vue version.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhyt1985%2Fvue-health","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhyt1985%2Fvue-health","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhyt1985%2Fvue-health/lists"}