OpenLightingProject / rdm-app

Code for the rdm.openlighting.org site
http://rdm.openlighting.org
17 stars 11 forks source link

Add Stylelint CSS linter #268

Closed FloEdelmann closed 4 years ago

FloEdelmann commented 4 years ago

Closes #266. References https://github.com/OpenLightingProject/open-fixture-library/pull/1163.

FloEdelmann commented 4 years ago

Double-slash comments are detected:

Screenshot_2020-01-14_11-11-14

peternewman commented 4 years ago

Do you fancy doing OLA too @FloEdelmann ? :laughing:

FloEdelmann commented 4 years ago

Sure, though I need a little more guidance on where to put the stylelint call and which files to lint.

From the list of CSS files, it looks like only javascript/new-src/css/style.css is self-authored, the other ones are copied from other frameworks, right? So I guess linting all CSS files in javascript/ should be the right way to go, to also catch future files? Or are built files also put there?

peternewman commented 4 years ago

Sure, though I need a little more guidance on where to put the stylelint call and which files to lint.

Great!

From the list of CSS files, it looks like only javascript/new-src/css/style.css is self-authored, the other ones are copied from other frameworks, right?

Yeah that looks about right, I thought there was some styling for the old UI and the RDM test tools but it does indeed look like they're just stock UI config. Actually it's in the HTML, can we lint that, I guess not easily?: https://github.com/OpenLightingProject/ola/blob/master/olad/www/ola.html

So I guess linting all CSS files in javascript/ should be the right way to go, to also catch future files? Or are built files also put there?

Sounds sensible, although actually it might be worth just doing javascript/new-src especially as I assume you'll add it to the Gruntfile in there, which already has a list of CSS files to process: https://github.com/OpenLightingProject/ola/blob/master/javascript/new-src/Gruntfile.js