Skip to content

Commit ec5aac2

Browse files
mysticateamichalsnik
authored andcommitted
Upgrade vue eslint parser (#404)
* Fix: a linting error * Fix: upgrade vue-eslint-parser and fix invalid tests
1 parent abbde6f commit ec5aac2

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

lib/rules/prop-name-casing.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = {
6363
description: 'enforce specific casing for the Prop name in Vue components',
6464
category: undefined // 'strongly-recommended'
6565
},
66-
fixable: null, // or "code" or "whitespace"
66+
fixable: null, // or "code" or "whitespace"
6767
schema: [
6868
{
6969
enum: allowedCaseOptions

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"eslint": "^3.18.0 || ^4.0.0"
4545
},
4646
"dependencies": {
47-
"vue-eslint-parser": "^2.0.1"
47+
"vue-eslint-parser": "^2.0.3"
4848
},
4949
"devDependencies": {
5050
"@types/node": "^4.2.16",

tests/lib/rules/no-parsing-error.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ tester.run('no-parsing-error', rule, {
206206
code: '<template><div xmlns=""></template>',
207207
options: [{ 'x-invalid-namespace': false }]
208208
},
209-
'<template><div/></template>'
209+
'<template><div/></template>',
210+
'<template><div v-show="">hello</div></template>'
210211
],
211212
invalid: [
212213
{
@@ -238,7 +239,7 @@ tester.run('no-parsing-error', rule, {
238239
},
239240
{
240241
filename: 'test.vue',
241-
code: '<template><div v-show="">hello</div></template>',
242+
code: '<template><div v-show=" ">hello</div></template>',
242243
errors: [
243244
{ message: 'Parsing error: Expected to be an expression, but got empty.', column: 24 }
244245
]

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

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ tester.run('valid-v-show', rule, {
4747
filename: 'test.vue',
4848
code: '<template><div v-show></div></template>',
4949
errors: ["'v-show' directives require that attribute value."]
50+
},
51+
{
52+
filename: 'test.vue',
53+
code: '<template><div v-show=""></div></template>',
54+
errors: ["'v-show' directives require that attribute value."]
5055
}
5156
]
5257
})

0 commit comments

Comments
 (0)