@@ -114,6 +114,56 @@ ruleTester.run('html-closing-bracket-spacing', rule, {
114
114
}
115
115
]
116
116
} ,
117
+ {
118
+ code : `
119
+ <template ></template >
120
+ <script ></script >
121
+ <style ></style >
122
+ ` ,
123
+ output : `
124
+ <template></template>
125
+ <script></script>
126
+ <style></style>
127
+ ` ,
128
+ errors : [
129
+ {
130
+ message : "Expected no space before '>', but found." ,
131
+ line : 2 ,
132
+ column : 18 ,
133
+ endColumn : 20
134
+ } ,
135
+ {
136
+ message : "Expected no space before '>', but found." ,
137
+ line : 2 ,
138
+ column : 30 ,
139
+ endColumn : 32
140
+ } ,
141
+ {
142
+ message : "Expected no space before '>', but found." ,
143
+ line : 3 ,
144
+ column : 16 ,
145
+ endColumn : 18
146
+ } ,
147
+ {
148
+ message : "Expected no space before '>', but found." ,
149
+ line : 3 ,
150
+ column : 26 ,
151
+ endColumn : 28
152
+ } ,
153
+ {
154
+ message : "Expected no space before '>', but found." ,
155
+ line : 4 ,
156
+ column : 15 ,
157
+ endColumn : 17
158
+ } ,
159
+ {
160
+ message : "Expected no space before '>', but found." ,
161
+ line : 4 ,
162
+ column : 24 ,
163
+ endColumn : 26
164
+ }
165
+ ]
166
+ } ,
117
167
{
118
168
code : '<template >\n <div>\n </div>\n <div />\n</template >' ,
119
169
output : '<template >\n <div >\n </div >\n <div/>\n</template >' ,
@@ -144,6 +194,63 @@ ruleTester.run('html-closing-bracket-spacing', rule, {
144
194
endColumn : 10
145
195
}
146
196
]
197
+ } ,
198
+ {
199
+ code : `
200
+ <template></template>
201
+ <script></script>
202
+ <style></style>
203
+ ` ,
204
+ output : `
205
+ <template ></template >
206
+ <script ></script >
207
+ <style ></style >
208
+ ` ,
209
+ options : [
210
+ {
211
+ startTag : 'always' ,
212
+ endTag : 'always' ,
213
+ selfClosingTag : 'never'
214
+ }
215
+ ] ,
216
+ errors : [
217
+ {
218
+ message : "Expected a space before '>', but not found." ,
219
+ line : 2 ,
220
+ column : 18 ,
221
+ endColumn : 19
222
+ } ,
223
+ {
224
+ message : "Expected a space before '>', but not found." ,
225
+ line : 2 ,
226
+ column : 29 ,
227
+ endColumn : 30
228
+ } ,
229
+ {
230
+ message : "Expected a space before '>', but not found." ,
231
+ line : 3 ,
232
+ column : 16 ,
233
+ endColumn : 17
234
+ } ,
235
+ {
236
+ message : "Expected a space before '>', but not found." ,
237
+ line : 3 ,
238
+ column : 25 ,
239
+ endColumn : 26
240
+ } ,
241
+ {
242
+ message : "Expected a space before '>', but not found." ,
243
+ line : 4 ,
244
+ column : 15 ,
245
+ endColumn : 16
246
+ } ,
247
+ {
248
+ message : "Expected a space before '>', but not found." ,
249
+ line : 4 ,
250
+ column : 23 ,
251
+ endColumn : 24
252
+ }
253
+ ]
147
254
}
148
255
]
149
256
} )
0 commit comments