@@ -108,114 +108,151 @@ tester.run('html-indent', rule, loadPatterns(
108
108
// Valid
109
109
[
110
110
// TemplateLiteral
111
- unIndent `
112
- <template>
113
- <div
114
- v-bind:b="
115
- \`
116
- test
117
- test
111
+ {
112
+ filename : 'test.vue' ,
113
+ code : unIndent `
114
+ <template>
115
+ <div
116
+ v-bind:b="
117
+ \`
118
+ test
118
119
test
119
- \`
120
- "
121
- ></div>
122
- </template>
123
- ` ,
120
+ test
121
+ \`
122
+ "
123
+ ></div>
124
+ </template>
125
+ `
126
+ } ,
124
127
125
128
// VAttribute
126
- unIndent `
127
- <template>
128
- <div a="
129
- a" b="b"></div>
130
- </template>
131
- ` ,
129
+ {
130
+ filename : 'test.vue' ,
131
+ code : unIndent `
132
+ <template>
133
+ <div a="
134
+ a" b="b"></div>
135
+ </template>
136
+ `
137
+ } ,
132
138
133
139
// Comments
134
- unIndent `
135
- <template>
136
- <!-- comment -->
137
- {{
138
- // comment
139
- // comment
140
- message
141
- }}
142
- </template>
143
- ` ,
144
- unIndent `
145
- <template>
146
- {{
147
- /*
148
- * comment
149
- */
150
- message
151
- }}
152
- </template>
153
- ` ,
154
- unIndent `
155
- <template>
156
- {{
157
- message
140
+ {
141
+ filename : 'test.vue' ,
142
+ code : unIndent `
143
+ <template>
144
+ <!-- comment -->
145
+ {{
146
+ // comment
147
+ // comment
148
+ message
149
+ }}
150
+ </template>
151
+ `
152
+ } ,
153
+ {
154
+ filename : 'test.vue' ,
155
+ code : unIndent `
156
+ <template>
157
+ {{
158
+ /*
159
+ * comment
160
+ */
161
+ message
162
+ }}
163
+ </template>
164
+ `
165
+ } ,
166
+ {
167
+ filename : 'test.vue' ,
168
+ code : unIndent `
169
+ <template>
170
+ {{
171
+ message
172
+ // comment
173
+ // comment
174
+ }}
175
+ <!-- comment -->
176
+ </template>
177
+ `
178
+ } ,
179
+ {
180
+ filename : 'test.vue' ,
181
+ code : unIndent `
182
+ <template>
183
+ {{
184
+ message
185
+ /*
186
+ * comment
187
+ */
188
+ }}
189
+ </template>
190
+ `
191
+ } ,
192
+ {
193
+ filename : 'test.vue' ,
194
+ code : unIndent `
195
+ <template>
196
+ {{
197
+ message
158
198
// comment
159
199
// comment
160
- }}
161
- <!-- comment -->
162
- </template>
163
- ` ,
164
- unIndent `
165
- <template>
166
- {{
167
- message
200
+ }}
201
+ <!-- comment -->
202
+ </template>
203
+ `
204
+ } ,
205
+ {
206
+ filename : 'test.vue' ,
207
+ code : unIndent `
208
+ <template>
209
+ {{
210
+ message
168
211
/*
169
- * comment
170
- */
171
- }}
172
- </template>
173
- ` ,
174
- unIndent `
175
- <template>
176
- {{
177
- message
178
- // comment
179
- // comment
180
- }}
181
- <!-- comment -->
182
- </template>
183
- ` ,
184
- unIndent `
185
- <template>
186
- {{
187
- message
188
- /*
189
- * comment
190
- */
191
- }}
192
- </template>
193
- ` ,
194
- unIndent `
195
- <template>
196
- <div>
197
- <!-- this comment is ignored because the next token doesn't exist. -->
198
- ` ,
199
- unIndent `
200
- <template>
201
- <div>
202
- <div></div>
203
- <!-- this comment is ignored because the next token doesn't exist. -->
204
- ` ,
205
- unIndent `
206
- <template>
207
- <div>
208
- <!-- this comment is ignored because the next token doesn't exist. -->
209
- ` ,
210
- unIndent `
211
- <template>
212
- <div>
213
- <div></div>
214
- <!-- this comment is ignored because the next token doesn't exist. -->
215
- ` ,
212
+ * comment
213
+ */
214
+ }}
215
+ </template>
216
+ `
217
+ } ,
218
+ {
219
+ filename : 'test.vue' ,
220
+ code : unIndent `
221
+ <template>
222
+ <div>
223
+ <!-- this comment is ignored because the next token doesn't exist. -->
224
+ `
225
+ } ,
226
+ {
227
+ filename : 'test.vue' ,
228
+ code : unIndent `
229
+ <template>
230
+ <div>
231
+ <div></div>
232
+ <!-- this comment is ignored because the next token doesn't exist. -->
233
+ `
234
+ } ,
235
+ {
236
+ filename : 'test.vue' ,
237
+ code : unIndent `
238
+ <template>
239
+ <div>
240
+ <!-- this comment is ignored because the next token doesn't exist. -->
241
+ `
242
+ } ,
243
+ {
244
+ filename : 'test.vue' ,
245
+ code : unIndent `
246
+ <template>
247
+ <div>
248
+ <div></div>
249
+ <!-- this comment is ignored because the next token doesn't exist. -->
250
+ `
251
+ } ,
216
252
217
253
// Ignores
218
254
{
255
+ filename : 'test.vue' ,
219
256
code : unIndent `
220
257
<template>
221
258
<div
@@ -234,6 +271,7 @@ tester.run('html-indent', rule, loadPatterns(
234
271
235
272
// Pre
236
273
{
274
+ filename : 'test.vue' ,
237
275
code : unIndent `
238
276
<template>
239
277
<pre>
@@ -250,6 +288,7 @@ tester.run('html-indent', rule, loadPatterns(
250
288
[
251
289
// TemplateLiteral
252
290
{
291
+ filename : 'test.vue' ,
253
292
code : unIndent `
254
293
<template>
255
294
<div
@@ -284,6 +323,7 @@ tester.run('html-indent', rule, loadPatterns(
284
323
285
324
// A mix of spaces and tabs.
286
325
{
326
+ filename : 'test.vue' ,
287
327
code : unIndent `
288
328
<template>
289
329
<div>
@@ -303,6 +343,7 @@ tester.run('html-indent', rule, loadPatterns(
303
343
]
304
344
} ,
305
345
{
346
+ filename : 'test.vue' ,
306
347
code : unIndent `
307
348
<template>
308
349
\t<div>
@@ -325,6 +366,7 @@ tester.run('html-indent', rule, loadPatterns(
325
366
326
367
// Comments
327
368
{
369
+ filename : 'test.vue' ,
328
370
code : unIndent `
329
371
<template>
330
372
<!-- comment -->
@@ -355,6 +397,7 @@ tester.run('html-indent', rule, loadPatterns(
355
397
]
356
398
} ,
357
399
{
400
+ filename : 'test.vue' ,
358
401
code : unIndent `
359
402
<template>
360
403
{{
@@ -381,6 +424,7 @@ tester.run('html-indent', rule, loadPatterns(
381
424
]
382
425
} ,
383
426
{
427
+ filename : 'test.vue' ,
384
428
code : unIndent `
385
429
<template>
386
430
{{
@@ -410,6 +454,7 @@ tester.run('html-indent', rule, loadPatterns(
410
454
]
411
455
} ,
412
456
{
457
+ filename : 'test.vue' ,
413
458
code : unIndent `
414
459
<template>
415
460
{{
@@ -440,6 +485,7 @@ tester.run('html-indent', rule, loadPatterns(
440
485
441
486
// Ignores
442
487
{
488
+ filename : 'test.vue' ,
443
489
code : unIndent `
444
490
<template>
445
491
<div
@@ -464,6 +510,7 @@ tester.run('html-indent', rule, loadPatterns(
464
510
]
465
511
} ,
466
512
{
513
+ filename : 'test.vue' ,
467
514
code : unIndent `
468
515
<template>
469
516
{{
@@ -497,6 +544,7 @@ tester.run('html-indent', rule, loadPatterns(
497
544
498
545
// Pre
499
546
{
547
+ filename : 'test.vue' ,
500
548
code : unIndent `
501
549
<template>
502
550
<pre
0 commit comments