Skip to content

Available Rules

  • ⭐ mark: the rule which is enabled by plugin:@intlify/vue-i18n/recommended or *.configs["flat/recommended"] preset.
  • ✒️ mark: the rule which is fixable by eslint --fix command.
Rule IDDescription
@intlify/vue-i18n/no-deprecated-i18n-componentdisallow using deprecated <i18n> components (in Vue I18n 9.0.0+)⭐✒️
@intlify/vue-i18n/no-deprecated-i18n-place-attrdisallow using deprecated place attribute (Removed in Vue I18n 9.0.0+)
@intlify/vue-i18n/no-deprecated-i18n-places-propdisallow using deprecated places prop (Removed in Vue I18n 9.0.0+)
@intlify/vue-i18n/no-deprecated-modulo-syntaxenforce modulo interpolation to be named interpolation⭐✒️
@intlify/vue-i18n/no-deprecated-tcdisallow using deprecated tc or $tc (Deprecated in Vue I18n 10.0.0, removed fully in Vue I18n 11.0.0)
@intlify/vue-i18n/no-deprecated-v-tdisallow using deprecated v-t custom directive (Deprecated in Vue I18n 11.0.0, removed fully in Vue I18n 12.0.0)
@intlify/vue-i18n/no-html-messagesdisallow use HTML localization messages
@intlify/vue-i18n/no-i18n-t-path-propdisallow using path prop with <i18n-t>⭐✒️
@intlify/vue-i18n/no-missing-keysdisallow missing locale message key at localization methods
@intlify/vue-i18n/no-raw-textdisallow to string literal in template or JSX
@intlify/vue-i18n/no-v-htmldisallow use of localization methods on v-html to prevent XSS attack
@intlify/vue-i18n/valid-message-syntaxdisallow invalid message syntax

Best Practices

Rule IDDescription
@intlify/vue-i18n/key-format-styleenforce specific casing for localization keys
@intlify/vue-i18n/no-duplicate-keys-in-localedisallow duplicate localization keys within the same locale
@intlify/vue-i18n/no-dynamic-keysdisallow localization dynamic keys at localization methods
@intlify/vue-i18n/no-missing-keys-in-other-localesdisallow missing locale message keys in other locales
@intlify/vue-i18n/no-unknown-localedisallow unknown locale name
@intlify/vue-i18n/no-unused-keysdisallow unused localization keys✒️
@intlify/vue-i18n/prefer-sfc-lang-attrrequire lang attribute on <i18n> block✒️

Stylistic Issues

Rule IDDescription
@intlify/vue-i18n/prefer-linked-key-with-parenenforce linked key to be enclosed in parentheses✒️
@intlify/vue-i18n/sfc-locale-attrrequire or disallow the locale attribute on <i18n> block