Skip to content
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

[CI] Add stylelint to prevent typos in CSS #556

Merged
merged 12 commits into from Mar 1, 2024

Conversation

Frenzie
Copy link
Member

@Frenzie Frenzie commented Feb 29, 2024

In reply to #555 (comment)

This is an initial poc. Some of the rules like length-zero-no-unit definitely make sense to me, but the existing code is full of things like 0px and I dislike changing things for the sake of changing them.

For -cr-etc I think we should be able to define a custom-property-pattern (as a regex).

For selector-type-no-unknown we should do something like "ignoreTypes": ["genre", "author", "etc"]. Disabling it completely would probably defeat the purpose.

And so on.

I don't know if I'll continue on this tonight, but this way the (rather excessive) list of complaints is already available to see.


This change is Reviewable

@poire-z
Copy link
Contributor

poire-z commented Feb 29, 2024

You should ignore all the obsolete ones we won't ever touch, and just check epub.css and html5.css (and fb2.css maybe but it has lots of non-HTML element names).

Lots of noise indeed :)
I probably won't reorder stuff for specificity, so it probably just warn instead of erroring.

@Frenzie
Copy link
Member Author

Frenzie commented Feb 29, 2024

It seemed to be unhappy with binding: keygen from #300 btw, but I'm not sure if there's anything to that or if it's just being overly strict.

Anyway, I think this should about do it.

@Frenzie Frenzie marked this pull request as ready for review February 29, 2024 23:25
@poire-z
Copy link
Contributor

poire-z commented Mar 1, 2024

It seemed to be unhappy with binding: keygen

That's in the old/current html5.css, that will be replaced in #555.

@poire-z
Copy link
Contributor

poire-z commented Mar 1, 2024

Looks ok to me, we'll see what it does with #555.

"no-duplicate-selectors": [true, { "severity": "warning" }],
"property-no-unknown": [true, {
"ignoreProperties": [
"binding",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: can be removed after #555.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants