Skip to content

Commit 3820b96

Browse files
committed
update use messageId
1 parent 142120f commit 3820b96

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,12 @@ module.exports = {
7878
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/v5.0.0-beta.3/docs/rules/valid-v-bind-sync.md'
7979
},
8080
fixable: null,
81-
schema: []
81+
schema: [],
82+
messages: {
83+
unexpectedInvalidElement: "'.sync' modifiers aren't supported on <{{name}}> non Vue-components.",
84+
unexpectedNonLhsExpression: "'.sync' modifiers require the attribute value which is valid as LHS.",
85+
unexpectedUpdateIterationVariable: "'.sync' modifiers cannot update the iteration variable '{{varName}}' itself."
86+
}
8287
},
8388

8489
create (context) {
@@ -94,7 +99,7 @@ module.exports = {
9499
context.report({
95100
node,
96101
loc: node.loc,
97-
message: "'.sync' modifiers aren't supported on <{{name}}> non Vue-components.",
102+
messageId: 'unexpectedInvalidElement',
98103
data: { name }
99104
})
100105
}
@@ -104,7 +109,7 @@ module.exports = {
104109
context.report({
105110
node,
106111
loc: node.loc,
107-
message: "'.sync' modifiers require the attribute value which is valid as LHS."
112+
messageId: 'unexpectedNonLhsExpression'
108113
})
109114
}
110115

@@ -119,7 +124,7 @@ module.exports = {
119124
context.report({
120125
node,
121126
loc: node.loc,
122-
message: "'.sync' modifiers cannot update the iteration variable '{{varName}}' itself.",
127+
messageId: 'unexpectedUpdateIterationVariable',
123128
data: { varName: id.name }
124129
})
125130
}

0 commit comments

Comments
 (0)