@intlify/vue-i18n/no-deprecated-i18n-component
disallow using deprecated
<i18n>
components (in Vue I18n 9.0.0+)
- ✒️️ The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
If you are migrating from Vue I18n v8 to v9, the <i18n>
component should be replaced with the <i18n-t>
component.
📖 Rule Details
This rule reports use of deprecated <i18n>
components (in Vue I18n 9.0.0+).
👎 Examples of incorrect code for this rule:
vue
<script>
/* eslint @intlify/vue-i18n/no-deprecated-i18n-component: 'error' */
</script>
<template>
<div class="app">
<!-- ✗ BAD -->
<i18n path="message.greeting" />
</div>
</template>
👍 Examples of correct code for this rule:
vue
<script>
/* eslint @intlify/vue-i18n/no-deprecated-i18n-component: 'error' */
</script>
<template>
<div class="app">
<!-- ✓ GOOD -->
<i18n-t keypath="message.greeting" />
</div>
</template>
📚 Further reading
🚀 Version
This rule was introduced in @intlify/eslint-plugin-vue-i18n
v0.11.0