Skip to content

Commit

Permalink
Upgrade vue-eslint-parser to v7.5.0 (#1440)
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Feb 14, 2021
1 parent 4b41399 commit 43f76df
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -56,7 +56,7 @@
"eslint-utils": "^2.1.0",
"natural-compare": "^1.4.0",
"semver": "^7.3.2",
"vue-eslint-parser": "^7.4.1"
"vue-eslint-parser": "^7.5.0"
},
"devDependencies": {
"@types/eslint": "^7.2.0",
Expand Down
35 changes: 35 additions & 0 deletions tests/lib/rules/no-restricted-syntax.js
Expand Up @@ -36,6 +36,20 @@ tester.run('no-restricted-syntax', rule, {
message: 'Call expressions are not allowed.'
}
]
},

{
// https://github.com/vuejs/eslint-plugin-vue/issues/870
code: `
<template>
<input :value="interpolate(foo, bar, true)">
</template>`,
options: [
{
selector: 'CallExpression > :nth-child(3)[value!=true]',
message: 'Third argument of interpolate must be true'
}
]
}
],
invalid: [
Expand Down Expand Up @@ -148,6 +162,27 @@ tester.run('no-restricted-syntax', rule, {
'Call expressions are not allowed.',
'Call expressions are not allowed.'
]
},

{
// https://github.com/vuejs/eslint-plugin-vue/issues/870
code: `
<template>
<input :value="interpolate(foo, bar, false)">
</template>`,
options: [
{
selector: 'CallExpression > :nth-child(3)[value!=true]',
message: 'Third argument of interpolate must be true'
}
],
errors: [
{
message: 'Third argument of interpolate must be true',
line: 3,
column: 48
}
]
}
]
})

0 comments on commit 43f76df

Please sign in to comment.