Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 437 Bytes

no-useless-string-wrapping.md

File metadata and controls

33 lines (24 loc) · 437 Bytes

no-useless-string-wrapping

Warns about unnecessarily wrapping a string that only contains an expression.

Rule Details

{    
    "rules": {
        "i18n-lingui/no-useless-string-wrapping": 1
    }
}

Examples of incorrect code for this rule:

<Trans>{name}</Trans>;
t`${name}`;

Examples of correct code for this rule:

<Trans>Hello {name}</Trans>;
t`hello ${name}`;