eslint-plugin-react-native icon indicating copy to clipboard operation
eslint-plugin-react-native copied to clipboard

no-raw-text gives a false positive with spaces?

Open OneOfOne opened this issue 2 years ago • 0 comments

<Text style={{ fontSize: 11, fontWeight: '400', textAlign: 'left' }}>
					<Icon {...styles.xxsIcon} name="clock-circle" /> <Moment date={msg.timestamp || '10'} element={Text} unix calendar/> <Icon {...styles.xxsIcon} name="arrow-right" />{getMsgType(msg)}
				</Text>

Gives 2x Whitespace(s) cannot be used outside of a <Text> tag.

Which is wrong, however I can't workaround it with skip:

'react-native/no-raw-text': [ 'error', { 'skip': [ 'Text.Icon', 'Text.Moment', 'Text.Text', 'Icon', 'Moment', 'Text' ]}]

OneOfOne avatar Jan 10 '22 18:01 OneOfOne