Skip to content

Latest commit

 

History

History
66 lines (44 loc) · 1.81 KB

no-deprecated-v-t.md

File metadata and controls

66 lines (44 loc) · 1.81 KB
title description since
@intlify/vue-i18n/no-deprecated-v-t
disallow using deprecated `v-t` custom directive (Deprecated in Vue I18n 11.0.0, removed fully in Vue I18n 12.0.0)
v3.0.0

@intlify/vue-i18n/no-deprecated-v-t

disallow using deprecated v-t custom directive (Deprecated in Vue I18n 11.0.0, removed fully in Vue I18n 12.0.0)

  • ⭐ The "extends": "plugin:@intlify/vue-i18n/recommended" or *.configs["flat/recommended"] property in a configuration file enables this rule.

If you are migrating from Vue I18n v10 to v11, v-t custom direcitve should be replaced with t or $t.

📖 Rule Details

This rule reports use of deprecated v-t custom directive (Deprecated in Vue I18n 11.0.0, removed fully in Vue I18n 12.0.0)

👎 Examples of incorrect code for this rule:

<script>
/* eslint @intlify/vue-i18n/no-deprecated-v-t: 'error' */
</script>
<template>
  <!-- ✗ BAD -->
  <p v-t="'banana'"></p>
</template>

👍 Examples of correct code for this rule:

<script>
/* eslint @intlify/vue-i18n/no-deprecated-v-t: 'error' */
</script>
<template>
  <!-- ✓ GOOD -->
  <p>{{ $t('banana') }}</p>
</template>

📚 Further reading

🚀 Version

This rule was introduced in @intlify/eslint-plugin-vue-i18n v3.0.0

🔍 Implementation