Skip to content

Commit

Permalink
Fix: typo in valid-v-else rule (#937)
Browse files Browse the repository at this point in the history
* Fix: typo in valid-v-else rule

* Fix: typo in valid-v-else rule
  • Loading branch information
philippbosch authored and kazupon committed Aug 16, 2019
1 parent ba68ae7 commit 6a00fa8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/rules/valid-v-else.js
Expand Up @@ -36,7 +36,7 @@ module.exports = {
context.report({
node,
loc: node.loc,
message: "'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."
message: "'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
})
}
if (utils.hasDirective(element, 'if')) {
Expand Down
12 changes: 6 additions & 6 deletions tests/lib/rules/valid-v-else.js
Expand Up @@ -44,32 +44,32 @@ tester.run('valid-v-else', rule, {
{
filename: 'test.vue',
code: '<template><template v-else><div></div></template></template>',
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."]
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
},
{
filename: 'test.vue',
code: '<template><div v-else></div></template>',
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."]
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
},
{
filename: 'test.vue',
code: '<template><div><div v-else></div></div></template>',
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."]
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
},
{
filename: 'test.vue',
code: '<template><div><div></div><div v-else></div></div></template>',
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."]
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
},
{
filename: 'test.vue',
code: '<template><div><div if="foo"></div><div v-else></div></div></template>',
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."]
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
},
{
filename: 'test.vue',
code: '<template><div><div v-if="foo"></div><div></div><div v-else></div></div></template>',
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else' directive."]
errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
},
{
filename: 'test.vue',
Expand Down

0 comments on commit 6a00fa8

Please sign in to comment.