Intellicode / eslint-plugin-react-native

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

no-unused-styles does not support React Fragment shorthand #258

Open alvinthen opened 4 years ago

alvinthen commented 4 years ago

As per title, when using <></>, eslint does not report any errors.

However, <React.Fragment></React.Fragment> does work

import React from 'react';
import { View, StyleSheet } from 'react-native';

export default function Tester() {
  return (
    <>
      <View style={styles.used} />
    </>
  );
}

const styles = StyleSheet.create({
  unused: {},
  used: {},
});