@@ -69,6 +69,10 @@ tester.run('component-name-in-template-casing', rule, {
69
69
code : '<template><div><slot></slot></div></template>' ,
70
70
options : [ 'PascalCase' , { registeredComponentsOnly : false } ]
71
71
} ,
72
+ {
73
+ code : '<template><div><template v-if="foo">bar</template></div></template>' ,
74
+ options : [ 'PascalCase' , { registeredComponentsOnly : false } ]
75
+ } ,
72
76
{
73
77
code : '<template><h1>Title</h1></template>' ,
74
78
options : [ 'PascalCase' , { registeredComponentsOnly : false } ]
@@ -151,6 +155,19 @@ tester.run('component-name-in-template-casing', rule, {
151
155
{
152
156
code : '<template><the-component><!--test</the-component></template>' ,
153
157
options : [ 'PascalCase' , { registeredComponentsOnly : false } ]
158
+ } ,
159
+
160
+ // built-in components (behave the same way as other components)
161
+ {
162
+ code : `
163
+ <template>
164
+ <component />
165
+ <suspense />
166
+ <teleport />
167
+ <client-only />
168
+ <keep-alive />
169
+ </template>
170
+ `
154
171
}
155
172
] ,
156
173
invalid : [
@@ -768,6 +785,35 @@ tester.run('component-name-in-template-casing', rule, {
768
785
'Component name "FooBar" is not kebab-case.' ,
769
786
'Component name "FooBar_Baz-qux" is not kebab-case.'
770
787
]
788
+ } ,
789
+ {
790
+ // built-in components (behave the same way as other components)
791
+ code : `
792
+ <template>
793
+ <component />
794
+ <suspense />
795
+ <teleport />
796
+ <client-only />
797
+ <keep-alive />
798
+ </template>
799
+ ` ,
800
+ output : `
801
+ <template>
802
+ <Component />
803
+ <Suspense />
804
+ <Teleport />
805
+ <ClientOnly />
806
+ <KeepAlive />
807
+ </template>
808
+ ` ,
809
+ options : [ 'PascalCase' , { registeredComponentsOnly : false } ] ,
810
+ errors : [
811
+ 'Component name "component" is not PascalCase.' ,
812
+ 'Component name "suspense" is not PascalCase.' ,
813
+ 'Component name "teleport" is not PascalCase.' ,
814
+ 'Component name "client-only" is not PascalCase.' ,
815
+ 'Component name "keep-alive" is not PascalCase.'
816
+ ]
771
817
}
772
818
]
773
819
} )
0 commit comments