Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support metrics with count #7

Open
bartveneman opened this issue Jun 2, 2019 · 0 comments
Open

Support metrics with count #7

bartveneman opened this issue Jun 2, 2019 · 0 comments
Labels
✨ enhancement New feature or request

Comments

@bartveneman
Copy link
Member

bartveneman commented Jun 2, 2019

css-analyzer has support for metrics with count, so we could choose to support that.

Use cases

  • It will help projects transitioning if a color like #aaaaaa may still appear in some old module, but should not appear more often than X times, if we know that the legacy module contains this color exactly X times.
  • As a developer I know that I use the error color #ff0000 exactly once, so I expect it to appear exactly once in my final output. Pre- or post-processing should not accidentally introduce this color more often
  • We know that -ms-text-size-adjust should only be used once in our project, so we'd like to be able to lint that.

Caveats

  • The 'old' config file should be supported, so we end up with having to check for both ['#aaa', '#bbb'] and [{count: 3, value: '#aaa'}, {count: -1, value: '#bbb'}], with -1 meaning that the color may appear infinitely.
@bartveneman bartveneman added the ✨ enhancement New feature or request label Jun 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Development

No branches or pull requests

1 participant