@intlify/vue-i18n/valid-message-syntax
disallow invalid message syntax
- ⭐ The
"extends": "plugin:@intlify/vue-i18n/recommended"
or*.configs["flat/recommended"]
property in a configuration file enables this rule.
This rule warns invalid message syntax.
This rule is useful localization leaks with incorrect message syntax.
📖 Rule Details
👎 Examples of incorrect code for this rule:
json
/* eslint @intlify/vue-i18n/valid-message-syntax: 'error' */
/* ✗ BAD */
{
"list-hello": "Hello! {{0}}",
"named-hello": "Hello! {{name}}"
}
👍 Examples of correct code for this rule:
json
/* eslint @intlify/vue-i18n/valid-message-syntax: 'error' */
/* ✓ GOOD */
{
"list-hello": "Hello! {0}",
"named-hello": "Hello! {name}",
"linked-hello": "@:list-hello"
}
👫 Related Rules
🚀 Version
This rule was introduced in @intlify/eslint-plugin-vue-i18n
v0.10.0