Skip to content

Commit 4185212

Browse files
committed
Fix invalid tests
1 parent a3bba07 commit 4185212

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/rules/no-multi-spaces.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ module.exports = {
4242
const text = sourceCode.getText(token, (token.range[0] - prevToken.range[1] + 1), 0)
4343

4444
const match = text.match(/([^\r\n\t\s])([ \t]+)([>]?)([\n\r]?)/)
45-
if (!match) return // there is no errors
45+
if (!match) {
46+
prevToken = token
47+
continue // there is no errors
48+
}
4649

4750
const spaces = match[2].length
4851
const requiredSpaces = match[3] === '>' || match[4] !== '' ? 0 : 1

tests/lib/rules/no-multi-spaces.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ ruleTester.run('no-multi-spaces', rule, {
8585
]
8686
},
8787
{
88-
code: '<template><div foo="" class="foo" /></template>',
89-
output: '<template><div foo="" class="foo" /></template>',
88+
code: '<template><div :foo="" class="foo" /></template>',
89+
output: '<template><div :foo="" class="foo" /></template>',
9090
errors: [{
9191
message: 'Extra whitespace detected.',
9292
type: 'HTMLSelfClosingTagClose'

0 commit comments

Comments
 (0)