Intellicode / eslint-plugin-react-native

React Native plugin for ESLint
MIT License
722 stars 130 forks source link

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

Open OneOfOne opened 2 years ago

OneOfOne commented 2 years ago
<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' ]}]