File tree 1 file changed +9
-37
lines changed
src/sg/rules/jsx-directive
1 file changed +9
-37
lines changed Original file line number Diff line number Diff line change 1
- id : v-on shorthand
1
+ id : v-on
2
2
language : html
3
3
rule :
4
- kind : attribute
5
- has :
6
- kind : attribute_name
7
- regex : ^@
8
- pattern : $NAME
9
- precedes :
10
- kind : quoted_attribute_value
11
- has :
12
- kind : attribute_value
13
- pattern : $V
14
- stopBy : end
4
+ kind : attribute_name
5
+ regex : ' ^@|v-on:'
6
+ pattern : $NAME
15
7
transform :
16
8
B :
17
- substring :
18
- startChar : 1
19
- endChar : 2
9
+ replace :
10
+ replace : ' ^@|v-on: '
11
+ by : ' '
20
12
source : $NAME
21
13
C :
22
14
convert :
23
15
source : $B
24
- toCase : upperCase
25
- D :
26
- substring :
27
- startChar : 2
28
- source : $NAME
29
- K :
30
- replace :
31
- replace : \.
32
- by : _
33
- source : $D
34
- fix : |-
35
- on$C$K={$V}
36
-
37
- ---
38
-
39
- id : v-on to on
40
- language : tsx
41
- rule :
42
- kind : property_identifier
43
- regex : ^v-on$
44
- fix :
45
- on
16
+ toCase : capitalize
17
+ fix : on$C
46
18
47
19
---
48
20
You can’t perform that action at this time.
0 commit comments