Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (21 sloc) 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';

The following patterns are not considered warnings:

<View><Text>some text</Text></View>
const text = 'some text';

This rule has an object option:

  • "skip" – allow to skip checking for the array of custom components
You can’t perform that action at this time.