jaredly / jaredly/stylecleanup

Does stylecleanup support imported styles ?

Open
#2 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
112
Forks
10
PR merge metrics
No merged PRs in 30d

Description

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({

Error: ...

});
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the styles.js and component.js examples in the issue and run stylecleanup against them. Trace how the tool resolves the imported styles object, then verify that grayText is identified as unused while redText is retained.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.