Skip to content

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Jun 23, 2023

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

@sgiehl sgiehl force-pushed the stylelinter branch 2 times, most recently from 1878525 to 5721ca6 Compare June 23, 2023 13:51
@sgiehl sgiehl requested review from michalkleiner and bx80 June 23, 2023 13:54
@sgiehl sgiehl added this to the 5.0.0 milestone Jun 23, 2023
@sgiehl
Copy link
Member Author

sgiehl commented Jun 23, 2023

@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.
Guess this might be a nice addition to improve our css code quality.

@michalkleiner
Copy link
Contributor

Yep, generally in favour of this 👍

Copy link
Contributor

@bx80 bx80 left a 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 👍

sgiehl and others added 2 commits June 26, 2023 09:09
Co-authored-by: Ben Burgess <88810029+bx80@users.noreply.github.com>
@sgiehl sgiehl marked this pull request as ready for review June 26, 2023 07:10
@sgiehl sgiehl merged commit e13e124 into 5.x-dev Jun 26, 2023
@sgiehl sgiehl deleted the stylelinter branch June 26, 2023 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants