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

Default exports and no-color-literals

Open pr0da opened this issue 7 years ago • 0 comments

Hi! The no-color-literals does not mark the following case as error:

export default StyleSheet.create({
  container: {
    color: '#fff'
  }
});

If I pull out the stylesheet into a variable and export that, than it works as expected.

const styles = StyleSheet.create({
  container: {
    color: '#fff'
  }
});
export default styles;

The first version should omit an error as well.

pr0da avatar Jun 08 '18 09:06 pr0da