cockpit-project / cockpit

Cockpit is a web-based graphical interface for servers.
http://www.cockpit-project.org/
GNU Lesser General Public License v2.1
11.27k stars 1.12k forks source link

lint css via webpack #17329

Closed garrett closed 2 years ago

garrett commented 2 years ago

We should probably add in some sort of linting for our CSS.

This would warn people when they try to use bad CSS practices, which would solve some headaches and me manually pointing out some of the issues. :wink:

This post has details on the concept and suggests stylelint (it should be pointed out that it's a little biased, as it's from the author of stylelint): https://css-tricks.com/stylelint/

But stylelint does look good and it does have webpack integration and does also support SASS (SCSS):

We'll probably have to introduce it with some relaxed rules at first and then tighten it up over time as we make fixes across the codebases.

garrett commented 2 years ago

@martinpitt: As this is both webpack and CSS related, it's probably a matter of you and me working on this together, most likely?

(And to anyone else who might be reading this who wants to take it on instead: You're more than welcome to do so!)

martinpitt commented 2 years ago

PR #17471 laid the foundation for this (just landed). Now we can resurrect PR #17408 and land this piece by piece.

jelly commented 2 years ago

We also should land this to starterkit too after it worked out and then land it in machines and podman.

jelly commented 2 years ago

Auto fixing rules to appy in future pull requests:

jelly commented 2 years ago

@garrett I think we have applied all the stylelint rules we wanted so I'm closing this issue.