Skip to content

Commit 6a00fa8

Browse files
philippboschkazupon
authored andcommitted
Fix: typo in valid-v-else rule (#937)
* Fix: typo in valid-v-else rule * Fix: typo in valid-v-else rule
1 parent ba68ae7 commit 6a00fa8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/rules/valid-v-else.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = {
3636
context.report({
3737
node,
3838
loc: node.loc,
39-
message: "'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."
39+
message: "'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
4040
})
4141
}
4242
if (utils.hasDirective(element, 'if')) {

tests/lib/rules/valid-v-else.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -44,32 +44,32 @@ tester.run('valid-v-else', rule, {
4444
{
4545
filename: 'test.vue',
4646
code: '<template><template v-else><div></div></template></template>',
47-
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."]
47+
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
4848
},
4949
{
5050
filename: 'test.vue',
5151
code: '<template><div v-else></div></template>',
52-
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."]
52+
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
5353
},
5454
{
5555
filename: 'test.vue',
5656
code: '<template><div><div v-else></div></div></template>',
57-
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."]
57+
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
5858
},
5959
{
6060
filename: 'test.vue',
6161
code: '<template><div><div></div><div v-else></div></div></template>',
62-
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."]
62+
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
6363
},
6464
{
6565
filename: 'test.vue',
6666
code: '<template><div><div if="foo"></div><div v-else></div></div></template>',
67-
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."]
67+
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
6868
},
6969
{
7070
filename: 'test.vue',
7171
code: '<template><div><div v-if="foo"></div><div></div><div v-else></div></div></template>',
72-
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."]
72+
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
7373
},
7474
{
7575
filename: 'test.vue',

0 commit comments

Comments
 (0)