@intlify/vue-i18n/no-deprecated-modulo-syntax
enforce modulo interpolation to be named interpolation
- ⭐ The
"extends": "plugin:@intlify/vue-i18n/recommended"
or*.configs["flat/recommended"]
property in a configuration file enables this rule. - ✒️️ The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
This rule enforces modulo interpolation to be named interpolation
📖 Rule Details
👎 Examples of incorrect code for this rule:
locale messages:
json
/* eslint @intlify/vue-i18n/no-deprecated-modulo-syntax: 'error' */
{
/* ✗ BAD */
"hello": "%{msg} world"
}
👍 Examples of correct code for this rule:
locale messages (for vue-i18n v9+):
json
/* eslint @intlify/vue-i18n/no-deprecated-modulo-syntax: 'error' */
{
/* ✓ GOOD */
"hello": "{msg} world"
}
🚀 Version
This rule was introduced in @intlify/eslint-plugin-vue-i18n
v3.0.0