-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Lint CSS code with stylelint #52
Conversation
LGTM |
Can we merge or does it need a second approval? |
Needs a second Maybe we should set this to one |
LGTM |
Lint CSS code with stylelint
generated from commit f931518
Agreed, set it to one LGTM, I think two would be kept once the website is live. |
Done with the latest commit, should be effective immediately. @jeddy3 we need another PR to try this on... ;) |
On its way :) |
😜 |
:global h5:hover .markdownIt-Anchor, | ||
:global h6:hover .markdownIt-Anchor { | ||
opacity: 1; | ||
} |
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.
@jeddy3 is there a way to indent based on the "nesting" of the selector? (to keep this?)
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.
Yep, I believe the 'hierarchicalSelectors option' within the indentation
rule would work here. But I figured it'd be better to use the actual nesting feature of postcss-cssnext
and not have to extend and override the indentation
rule within stylelint-config-standard
. The CSS now looks like:
:global .markdownIt-Anchor {
position: absolute;
left: -1.5rem;
opacity: 0.1;
transition: opacity 0.2s;
@nest :--headings:hover & {
opacity: 1;
}
}
It was changed in the follow-up PR that added postcss-cssnext
to the boilerplate.
Sound good to you, or shall we take another look at it?
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.
Good enough. Thanks for the clear explanation.
Ref: #51
Adds stylelint to the
npm run lint
run-script.I put the config inside
package.json
to match the existing babel and eslint configs.There were a handful of changes to the CSS to bring it inline with
stylelint-config-standard
, mainly consistent leading zeros and hex color case.