Skip to content

Does stylecleanup support imported styles ? #2

@Fafly

Description

@Fafly

We try stylecleanup on our codebase and it didn't find any unused styles.

We were wondering if stylecleanup is supposed to delete grayText in the example below.

// styles.js
import StyleSheet from 'react-native';

export default StyleSheet.create({
  grayText: {
    color: '#D0D0D0',
  },
  redText: {
    color: '#FF0000'
  },
});
// component.js
{...}
import styles from './styles.js';

class Example extends Component {
  render({
    <View>
      <Text style={styles.redText}>Error: ...</Text>
    </View>
  });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions