-
Notifications
You must be signed in to change notification settings - Fork 5k
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
[infrastructure] Add (S)CSS linting infrastructure #4564
Conversation
# reason to make root a compound selector (?) | ||
selector-root-no-composition: true | ||
# http://www.paulirish.com/2010/the-protocol-relative-url/ | ||
function-url-no-scheme-relative: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should actually enforce using HTTPS wherever possible, not relative URLs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's what setting this to true
does https://github.com/stylelint/stylelint/blob/master/src/rules/function-url-no-scheme-relative/README.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AH, OK. I was searching around and saw the initial issue. They were saying relative URLs there were good and should be enforced, so I thought this was doing that instead.
LGTM |
LGTM What are the // postcss-bem-linter: comments used for? (besides ignoring) |
@rfru it tells postcss-bem-linter that the code contained in between them is a BEM component - https://github.com/postcss/postcss-bem-linter#defining-a-component I put the |
# http://stackoverflow.com/q/3851091 | ||
selector-attribute-quotes: always | ||
# Single-quotes are a convention throughout our codebase | ||
string-quotes: single |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've been doing double quotes in CSS and single quotes in JS, but I suppose single quotes everywhere works too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay no problem. I can change this. I don't mind dbl-quotes anyway. They look like attributes and that's what's used in the WebIDL for attrs (AFAIK).
LGTM, can't believe the range of options available! |
69394ff
to
6b2f947
Compare
Part of #4464
Relates to #4539
NOTE: Assigning everyone since this should get feedback from all core team members