Skip to content

Commit 8e5fe6d

Browse files
committed
fix: v-on to on
1 parent 30285dc commit 8e5fe6d

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

playground/src/App.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
<script setup>
2-
import { ref } from 'vue'
1+
<script setup lang="ts">
32
import Comp from './components/Comp.vue'
43
54
const list = [{ id: 1 }]
65
const bind = { }
76
const on = { submit: () => {} }
8-
const select = $ref()
7+
const select = $ref<{ id: number }>()
98
</script>
109

1110
<template>
@@ -16,7 +15,7 @@ const select = $ref()
1615
v-bind="bind"
1716
v-model:id="i.id"
1817
v-loading.fullscreen.lock="true"
19-
v-memo="[select.id === i.id]"
18+
v-memo="[select?.id === i.id]"
2019
v-on="on"
2120
@click.once="select = i"
2221
@submit="alert"

src/rules/jsx-directive/v-on.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ fix: |-
3636
3737
---
3838

39-
id: v-on transform to on
40-
language: vue
39+
id: v-on to on
40+
language: vueTsx
4141
rule:
42-
kind: attribute_name
42+
kind: property_identifier
4343
regex: ^v-on$
4444
fix:
4545
on
4646

4747
---
4848

49-
id: tsx v-on
49+
id: v-on
5050
language: vueTsx
5151
rule:
5252
kind: jsx_expression

0 commit comments

Comments
 (0)