eslint-plugin
eslint-plugin copied to clipboard
Create a `recomended` set of rules
"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.
Agree! It is usual when there is some recommended set of rules.