Skip to content

@intlify/vue-i18n/no-unknown-locale

disallow unknown locale name

📖 Rule Details

This rule reports the use of unknown locale names.

By default, this rule only commonly known locale names specified in RFC 5646 are allowed. The rule uses the is-language-code package to check if the locale name is compatible with RFC 5646.

⚙️ Options

json
{
  "@intlify/vue-i18n/no-unknown-locale": [
    "error",
    {
      "locales": [],
      "disableRFC5646": false
    }
  ]
}
  • locales ... Specify the locale names you want to use specially in an array. The rule excludes the specified name from the check.
  • disableRFC5646 ... If true, only the locale names listed in locales are allowed.

🚀 Version

This rule was introduced in @intlify/eslint-plugin-vue-i18n v1.3.0

🔍 Implementation