Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 560 Bytes

no-raw-text.md

File metadata and controls

30 lines (21 loc) · 560 Bytes

Detect raw text outside of Text component

All strings in React Native should be wrapped with a Text component.

Rule Details

The following patterns are considered warnings:

<View>some text</View>
const text = 'some text';
<View>{`${text}`}</View>

The following patterns are not considered warnings:

<View><Text>some text</Text></View>
const text = 'some text';
<View><Text>{`${text}`}</Text></View>

This rule has an object option:

  • "skip" – allow to skip checking for the array of custom components