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

no-unused-styles does not support React Fragment shorthand

Open alvinthen opened this issue 5 years ago • 0 comments

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: {},
});

alvinthen avatar May 24 '20 15:05 alvinthen