It is not a good practice to control indentation by adding spaces to start and end of phrases, those can be lost in translations. This can potentially lead to bugs in some locales:
BAD:
import { t } from 'ttag';
const text = t` hello`;
const text = t`hello `;
GOOD:
import { t } from 'ttag';
const text = t`hello`;
Let's consider we have this configuration in .eslintrc
:
{
"plugins": ["ttag"],
"rules": {
"ttag/no-start-and-trailing-spaces-in-translations": 2
}
}
import { t } from 'ttag';
const text = t` hello`;
const text2 = jt` hello`;
const text3 = gettext(' hello');
const ngettext = ngettext(msgid` hello`, `hello`);