File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ # vue-i18n/valid-message-syntax
2+
3+ > disallow invalid message syntax
4+
5+ - :star : The ` "extends": "plugin:vue-i18n/recommended" ` property in a configuration file enables this rule.
6+
7+ This rule warns invalid message syntax.
8+
9+ This rule is useful localization leaks with incorrect message syntax.
10+
11+ ## :book : Rule Details
12+
13+ :-1 : Examples of ** incorrect** code for this rule:
14+
15+ ``` json
16+ // ✗ BAD
17+ {
18+ "list-hello" : " Hello! {{0}}" ,
19+ "named-hello" : " Hello! {{name}}" ,
20+ "linked-hello" : " ref:list-hello"
21+ }
22+ ```
23+
24+
25+ :+1 : Examples of ** correct** code for this rule:
26+
27+ ``` json
28+ // ✓ GOOD
29+ {
30+ "list-hello" : " Hello! {0}" ,
31+ "named-hello" : " Hello! {name}" ,
32+ "linked-hello" : " @:list-hello"
33+ }
34+ ```
You can’t perform that action at this time.
0 commit comments