diff --git a/package.json b/package.json index 9b91a84..370bec4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@vue-macros/cli", "type": "module", - "version": "1.0.9", + "version": "1.0.10", "packageManager": "pnpm@8.10.5", "description": "Rewriting at vue macros powered by ast-grep.", "author": "zhiyuanzmj ", diff --git a/playground/src/components/Comp.vue b/playground/src/components/Comp.vue index 8a219fe..c4b46ee 100644 --- a/playground/src/components/Comp.vue +++ b/playground/src/components/Comp.vue @@ -5,7 +5,7 @@ bottom - +
Fragment
diff --git a/src/index.ts b/src/index.ts index 3f46c61..290e24a 100755 --- a/src/index.ts +++ b/src/index.ts @@ -96,6 +96,7 @@ async function useTsx(cb = () => {}, action = 'clean') { } if (['jsx-directive', 'setup-sfc'].includes(macro)) { + await $`${sg} scan -c ${config}.yml -U --filter '^self-closing-tag' ${target}` await $`${sg} scan -c ${config}.yml -U --filter '^v-' ${target}` await $`${sg} scan -c ${config}.yml -U --filter '^${macro === 'setup-sfc' ? 'export-render' : render}' ${target}` await useTsx(async () => { diff --git a/src/rules/jsx-directive/v-tag.yml b/src/rules/jsx-directive/v-tag.yml index 884b96f..912cc05 100644 --- a/src/rules/jsx-directive/v-tag.yml +++ b/src/rules/jsx-directive/v-tag.yml @@ -1,4 +1,4 @@ -id: v-self-closing-tag +id: self-closing-tag language: html rule: kind: start_tag