openshift / console-plugin-template

Minimal template for writing OpenShift console plugins
Apache License 2.0
40 stars 51 forks source link

build: add stylelint #4

Closed spadgett closed 2 years ago

spadgett commented 2 years ago

Use stylelint to lint CSS and enforce plugin best practices:

  1. Disallow color names and hex colors to better support dark mode
  2. Disallow .pf- and .co- classname prefixes to avoid clashes with default console styles
  3. Disallow naked element selectors like table and li
spadgett commented 2 years ago

I added a check for *.

jpinsonneau commented 2 years ago

@spadgett Can we also add an example of working CSS using the general guidelines in ExamplePage ?

It will help other teams to get started. We had troubles to configure styling & testing on our side.

Thanks

spadgett commented 2 years ago

@spadgett Can we also add an example of working CSS using the general guidelines in ExamplePage ?

Sure, I will add that in a follow up.