-
Notifications
You must be signed in to change notification settings - Fork 8
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
Stylelint doesn't catch mistyped background-image value #121
Comments
It looks like stylelint doesn't do much syntax validation beyond that implemented in specific rules. None of this causes parser errors: .foo {
background: foo.jpg );
display: hello?;
water: wet;
width: wide;
} You get |
Could experiment with something like https://github.com/csstree/stylelint-validator |
Also from #100:
|
This regression caused by an invalid value: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/800761 |
In the above example, commas were added to an While this is clearly an error, it is not invalid code, it just reads as 4 animations with short definitions: $0.style.animation='rotate, 700ms, infinite, linear'
console.log( $0.style.animation )
'0s ease 0s 1 normal none running rotate, 700ms ease 0s 1 normal none running none, 0s ease 0s infinite normal none running none, 0s linear 0s 1 normal none running none' |
https://github.com/csstree/stylelint-validator has some support for LESS values but produces false positives on mixins. We could enable the rule for CSS only, but that would make it considerably less useful in MediaWiki where many (most?) files are LESS. |
That's probably an upstream issue, but
isn't caught locally.
The text was updated successfully, but these errors were encountered: