@@ -50,7 +50,8 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
50
50
defineOptions({ inheritAttrs: true })
51
51
</script>
52
52
<template><div v-bind="$attrs"/><div/></template>
53
- `
53
+ ` ,
54
+ options : [ { checkMultiRootNodes : true } ]
54
55
} ,
55
56
// ignore multi root
56
57
{
@@ -61,7 +62,8 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
61
62
<div v-if="condition2" v-bind="$attrs"></div>
62
63
<div v-else></div>
63
64
</template>
64
- `
65
+ ` ,
66
+ options : [ { checkMultiRootNodes : true } ]
65
67
} ,
66
68
{
67
69
filename : 'test.vue' ,
@@ -71,7 +73,8 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
71
73
<div v-else-if="condition2"></div>
72
74
<div v-bind="$attrs"></div>
73
75
</template>
74
- `
76
+ ` ,
77
+ options : [ { checkMultiRootNodes : true } ]
75
78
} ,
76
79
{
77
80
filename : 'test.vue' ,
@@ -81,7 +84,8 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
81
84
<div v-if="condition1"></div>
82
85
<div v-else></div>
83
86
</template>
84
- `
87
+ ` ,
88
+ options : [ { checkMultiRootNodes : true } ]
85
89
} ,
86
90
{
87
91
filename : 'test.vue' ,
@@ -91,7 +95,8 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
91
95
<div v-else-if="condition2"></div>
92
96
<div v-if="condition3" v-bind="$attrs"></div>
93
97
</template>
94
- `
98
+ ` ,
99
+ options : [ { checkMultiRootNodes : true } ]
95
100
} ,
96
101
{
97
102
filename : 'test.vue' ,
@@ -202,6 +207,17 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
202
207
}
203
208
]
204
209
} ,
210
+ {
211
+ filename : 'test.vue' ,
212
+ code : `
213
+ <script setup>
214
+ defineOptions({ inheritAttrs: true })
215
+ </script>
216
+ <template><div v-bind="$attrs"/><div/></template>
217
+ ` ,
218
+ options : [ { checkMultiRootNodes : false } ] ,
219
+ errors : [ { message : 'Set "inheritAttrs" to false.' } ]
220
+ } ,
205
221
// single root with a condition group
206
222
{
207
223
filename : 'test.vue' ,
@@ -212,6 +228,7 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
212
228
<div v-else></div>
213
229
</template>
214
230
` ,
231
+ options : [ { checkMultiRootNodes : true } ] ,
215
232
errors : [ { message : 'Set "inheritAttrs" to false.' } ]
216
233
} ,
217
234
{
@@ -224,6 +241,7 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
224
241
<div v-else></div>
225
242
</template>
226
243
` ,
244
+ options : [ { checkMultiRootNodes : true } ] ,
227
245
errors : [ { message : 'Set "inheritAttrs" to false.' } ]
228
246
} ,
229
247
{
@@ -234,6 +252,7 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
234
252
<div v-else></div>
235
253
</template>
236
254
` ,
255
+ options : [ { checkMultiRootNodes : true } ] ,
237
256
errors : [ { message : 'Set "inheritAttrs" to false.' } ]
238
257
} ,
239
258
{
@@ -243,6 +262,7 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
243
262
<div v-if="condition1" v-bind="$attrs"></div>
244
263
</template>
245
264
` ,
265
+ options : [ { checkMultiRootNodes : true } ] ,
246
266
errors : [ { message : 'Set "inheritAttrs" to false.' } ]
247
267
}
248
268
]
0 commit comments