Commit Graph

1 Commits

  • feat(rules): add Vue coding-style and composables/reactivity rules
    Add rules/vue/coding-style.md:
    - <script setup> Composition API enforcement
    - Naming conventions (PascalCase components, useCamelCase composables)
    - SFC structure order, props/emits/slots patterns
    - Vue 3.5+ reactive props destructure with native default values
    - Template conventions, import ordering
    
    Add rules/vue/hooks.md:
    - ref() vs reactive() guidance and replacement pitfalls
    - Vue 3.5+ reactive props destructure (version-specific: Vue<3.5 loses reactivity, 3.5+ reactive by default with watch limitation)
    - computed() purity rules, watch vs watchEffect comparison
    - Watcher cleanup with onWatcherCleanup() (Vue 3.5+) and onCleanup callback
    - useTemplateRef() (Vue 3.5+) replacing name-matched plain refs
    - Composable conventions (use prefix, reactive returns, MaybeRef inputs)
    - shallowRef/shallowReactive for large data structures