Skip to content

v4.2.0

Choose a tag to compare

@github-actions github-actions released this 23 Feb 12:03
· 34 commits to master since this release
f717c61

Minor Changes

  • #697 b8dd9e8 Thanks @samuelwei! - add support for eslint v10

  • #689 bb9e1df Thanks @Jerc92! - Add valid-plural-forms rule to validate plural form counts per locale

    This rule enforces that plural messages have the correct number of forms for each locale, helping prevent runtime errors when vue-i18n's pluralRules function returns an out-of-bounds index.

    • Defaults to [2, 3] for all locales (matches vue-i18n's built-in pluralization)
    • Use pluralFormCounts to configure locale-specific overrides
    • Arrays allow multiple valid counts (e.g., [2, 4] for languages supporting both binary and full pluralization)

    Configuration example:

    {
      "@intlify/vue-i18n/valid-plural-forms": [
        "error",
        {
          "pluralFormCounts": {
            "sl": [2, 4],
            "sr-latn": [2, 3]
          }
        }
      ]
    }

Patch Changes