Skip to content

Commit 8a61053

Browse files
committed
fixed
1 parent 543f0a7 commit 8a61053

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/rules/valid-v-bind-sync.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ Nothing.
6060

6161
[no-parsing-error]: no-parsing-error.md
6262

63+
## :books: Further reading
64+
65+
- [Guide - `.sync` Modifier]([https://vuejs.org/v2/guide/list.html#v-for-with-a-Component](https://vuejs.org/v2/guide/components-custom-events.html#sync-Modifier))
66+
6367
## :mag: Implementation
6468

6569
- [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/valid-v-bind-sync.js)

lib/rules/valid-v-bind-sync.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ module.exports = {
6666

6767
create (context) {
6868
return utils.defineTemplateBodyVisitor(context, {
69-
"VAttribute[directive=true][key.name='bind']" (node) {
70-
if (node.key.modifiers.indexOf('sync') < 0) {
69+
"VAttribute[directive=true][key.name.name='bind']" (node) {
70+
if (!node.key.modifiers.map(mod => mod.name).includes('sync')) {
7171
return
7272
}
7373
const element = node.parent.parent

0 commit comments

Comments
 (0)