Rule: i18n

Ensures following best practices for i18n.

Rationale

Makes the code more maintainable in i18n sense.

Notes:
TS Only

Config

One (or both) of the following arguments must be provided:

  • check-id Makes sure i18n attributes have ID specified
  • check-text Makes sure there are no elements with text content but no i18n attribute
Examples
"i18n": [true, "check-id"]
"i18n": [true, "check-text"]
"i18n": [true, "check-id", "check-text"]
Schema
{
  "items": {
    "enum": [
      "check-id",
      "check-text"
    ],
    "type": "string"
  },
  "maxLength": 2,
  "minLength": 1,
  "type": "array"
}