eslint-plugin icon indicating copy to clipboard operation
eslint-plugin copied to clipboard

Create a `recomended` set of rules

Open timofei-iatsenko opened this issue 1 year ago • 1 comments

"lingui/recommended"

This is my proposition for recomended set:

{
  "rules": {
    "lingui/missing-lingui-transformation": 2,
    "lingui/t-call-in-function": 2,
    "lingui/no-single-varibles-to-translate": 2,
    "lingui/i18n-only-identifiers": 1,
    "lingui/no-single-tag-to-translate": 2,
    "lingui/no-trans-inside-trans": 2,
  }
}

Explanation:

Almost all rules are very helpfull. I removed lingui/text-restrictions from recomended because there so many variations how it could be setup. And we should think carefully about sensisble defaults.

I also marked lingui/i18n-only-identifiers as warning instead of error/ I personally think that this is a very important rule, but for some small projects it might be cumbersome to create an additional variable just to provide more context for the translator, that's why only warning.

timofei-iatsenko avatar Aug 18 '23 07:08 timofei-iatsenko

Agree! It is usual when there is some recommended set of rules.

yslpn avatar Apr 25 '24 07:04 yslpn