mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-16 16:36:53 +08:00
* feat(rules): add vue and nuxt rule sets Add rules/vue/ and rules/nuxt/, each with the standard 5-file layout (coding-style, hooks, patterns, security, testing) that extends common/, following the Adding a New Language convention in rules/README.md. Vue rules reference the frontend-patterns and vite-patterns skills. Nuxt rules reference the nuxt4-patterns and vite-patterns skills. Content is concise (1.5 to 4 KB per file) since rules load as always-on context. * fix(rules): address PR review on vue and nuxt rule sets - nuxt/coding-style: generalize the srcDir-override note (drop project-specific 'this repo' phrasing so it is correct for any Nuxt project). - vue/hooks: add **/*.ts and **/*.tsx to paths so the lint/typecheck guidance loads when editing composables and stores. - nuxt/hooks: add **/*.vue to paths (covers pages/layouts/components) and wrap nuxi typecheck in a timeout, mirroring web/hooks.md. - nuxt/security: tighten the /security-review auto-trigger scope to external fetch, credential handling, and sensitive mutations, with examples. - nuxt/testing: correct 'Vitest-only' to note built-in Playwright E2E, and drop the @nuxt/test-utils version pin. - README: register vue and nuxt in the structure tree and install examples. Skipped: 'X specific' -> 'X-specific' hyphenation (all existing rule sets use the unhyphenated form, changing only vue/nuxt would be inconsistent); repeating the 80%/TDD mandate in nuxt/testing (already inherited from common/testing.md).
1.4 KiB
1.4 KiB
paths
| paths | |||
|---|---|---|---|
|
Vue Hooks
This file extends common/hooks.md with Vue specific content.
PostToolUse Targets
Run on *.vue, *.ts, and *.tsx after edits. Scope to changed files where possible.
Typecheck
- Use
vue-tsc --noEmitfor SFC plus TypeScript checking. Plaintsccannot read.vuesingle-file components, so it must not be the typecheck hook for this project. - Typecheck is project-wide. Debounce or scope it so a save-on-every-keystroke loop does not stall the editor.
Lint and Format
eslint --fixwitheslint-plugin-vue(flat-configvue/vue3-recommended) covers both template and script lint.prettier --writefor formatting. Prefer Prettier-via-ESLint over a separate Prettier pass to avoid double formatting and fight loops.
Architecture Boundaries
- Optional: enforce Feature-Sliced Design slice boundaries with
@feature-sliced/steigeroreslint-plugin-boundariesto block deep cross-slice imports.
Sequencing
# changed files only
eslint --fix "$FILE"
prettier --write "$FILE"
# project-wide, debounced
vue-tsc --noEmit
- Run lint and format per-file first, then the project-wide typecheck last so type errors reflect the formatted source.
Reference
- ECC skills:
frontend-patterns,vite-patterns. - Docs: https://github.com/vuejs/language-tools (vue-tsc) · https://eslint.vuejs.org/ · https://github.com/feature-sliced/steiger