-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Introduce stylelint to lint css / less files #20926
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
Conversation
1878525
to
5721ca6
Compare
@bx80 @michalkleiner Any thoughts about this one? I've added a temporary commit, that introduces the usage of an invalid hex color, as that is currently the only rule that is checked. You can see the automatic comment in the changed files in this PR. |
Yep, generally in favour of this 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this, adding some checks for invalid or duplicate rules is useful since they typically don't throw any obvious error so can easily be missed 👍
Co-authored-by: Ben Burgess <88810029+bx80@users.noreply.github.com>
Description:
While looking through our CSS / LESS files I came across a couple of rules, that were incorrect, duplicate or useless.
Some of this problems would have been easily discover-able using a linter.
This PR introduces the usage of stylelint (https://stylelint.io/) to improve that.
I've only included one rule for now, so this PR doesn't contain any code changes. I'll create follow-up PRs later to also include some rules that will require adjustments in the css/less files.
Note: We shouldn't use stylelint to force a certain formatting of such files. Stylelint deprecated all rules around that in favor of using tools like prettier. We can consider implementing that one as well later.
Review