jaredly / stylecleanup

Find & fix unused styles in react native and aphrodite
MIT License
112 stars 11 forks source link

Feature Requests #9

Closed iamclaytonray closed 3 years ago

iamclaytonray commented 4 years ago

Would you accept PRs supporting the following?

  1. Ignore flag in comments (// stylecleanup:ignore) (I have this working locally)
  2. Minimal output flag (example below. also working locally)
File: ./src/components/Button.js
Unused styles šŸ¤”
Unused style declaration 'container' at 100:2

The current output is something like:

File: ./src/components/Button.js
Unused styles šŸ¤”
Unused style declaration 'container' at 100:2

container: {
  flex: 1,
}

Reasons

For 1, there is one main reason:

For 2, the biggest reason is when you have a lot of unused styles (100+), it can be a bit tedious going back & forth from terminal & code. Allowing a minimal option still shows you pertinent information (the name of the style & LOC) and helps you be a bit more efficient. But, it would be easy to just not supply a --minimal flag if you wanted to see full output