Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 533 Bytes

no-empty-strings.md

File metadata and controls

37 lines (26 loc) · 533 Bytes

Prevent empty strings from being given to <fbt> or fbt() (fbt/no-empty-strings)

Rule Details

This rule prevents empty strings from being given to <fbt> or fbt().

Examples of incorrect code for this rule:

<fbt desc="Greeting"></fbt>
<fbt desc="Greeting">{''}</fbt>
<fbt desc="">Hello</fbt>
fbt('', 'Greeting')
fbt('Hello', '')

Examples of correct code for this rule:

<fbt desc="Greeting">Hello</fbt>
fbt('Hello', 'Greeting')