Skip to content

Commit 43f76df

Browse files
authored
Upgrade vue-eslint-parser to v7.5.0 (#1440)
1 parent 4b41399 commit 43f76df

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"eslint-utils": "^2.1.0",
5757
"natural-compare": "^1.4.0",
5858
"semver": "^7.3.2",
59-
"vue-eslint-parser": "^7.4.1"
59+
"vue-eslint-parser": "^7.5.0"
6060
},
6161
"devDependencies": {
6262
"@types/eslint": "^7.2.0",

tests/lib/rules/no-restricted-syntax.js

+35
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ tester.run('no-restricted-syntax', rule, {
3636
message: 'Call expressions are not allowed.'
3737
}
3838
]
39+
},
40+
41+
{
42+
// https://github.com/vuejs/eslint-plugin-vue/issues/870
43+
code: `
44+
<template>
45+
<input :value="interpolate(foo, bar, true)">
46+
</template>`,
47+
options: [
48+
{
49+
selector: 'CallExpression > :nth-child(3)[value!=true]',
50+
message: 'Third argument of interpolate must be true'
51+
}
52+
]
3953
}
4054
],
4155
invalid: [
@@ -148,6 +162,27 @@ tester.run('no-restricted-syntax', rule, {
148162
'Call expressions are not allowed.',
149163
'Call expressions are not allowed.'
150164
]
165+
},
166+
167+
{
168+
// https://github.com/vuejs/eslint-plugin-vue/issues/870
169+
code: `
170+
<template>
171+
<input :value="interpolate(foo, bar, false)">
172+
</template>`,
173+
options: [
174+
{
175+
selector: 'CallExpression > :nth-child(3)[value!=true]',
176+
message: 'Third argument of interpolate must be true'
177+
}
178+
],
179+
errors: [
180+
{
181+
message: 'Third argument of interpolate must be true',
182+
line: 3,
183+
column: 48
184+
}
185+
]
151186
}
152187
]
153188
})

0 commit comments

Comments
 (0)