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

Fix support for *-empty-line-before in HTML #2854

Merged
merged 7 commits into from Sep 12, 2017

Conversation

4 participants
@gucong3000
Member

gucong3000 commented Sep 5, 2017

Which issue, if any, is this issue related to?

#2853

Is there anything in the PR that needs further explanation?

"No, it's self explanatory."

gucong3000 added some commits Sep 5, 2017

@@ -59,7 +59,7 @@ const rule = function(expectation, options, context) {
const isNested = atRule.parent !== root;
// Ignore the first node
if (atRule === root.first) {
if (atRule === root.first || atRule === atRule.root().first) {

This comment has been minimized.

@evilebottnawi

evilebottnawi Sep 5, 2017

Member

Please add comment around atRule === atRule.root().first and good work!

This comment has been minimized.

@gucong3000
@evilebottnawi

Thanks!

@gucong3000 gucong3000 changed the title from Closes #2853 to fix support for *-empty-line-before in HTML Sep 7, 2017

@jeddy3

@gucong3000 Thanks - tests look great. I've made a request out creating a util.

@@ -51,8 +51,12 @@ const rule = function(expectation, options, context) {
return;
}
// Ignore the first node
if (rule === root.first) {
if (

This comment has been minimized.

@jeddy3

jeddy3 Sep 10, 2017

Member

Can we please move this into a util, e.g. isFirstNodeOfRoot(node) as I suspect other rules will need too.

@jeddy3 jeddy3 changed the title from fix support for *-empty-line-before in HTML to Fix support for *-empty-line-before in HTML Sep 10, 2017

@jeddy3

@gucong3000 Thanks for making the util change. I've added one query.

@@ -52,7 +53,7 @@ const rule = function(expectation, options, context) {
}
// Ignore the first node
if (rule === root.first) {
if (isFirstNodeOfRoot(rule, root)) {

This comment has been minimized.

@jeddy3

jeddy3 Sep 11, 2017

Member

Did you mean to pass root in as a second parameter?

This comment has been minimized.

@gucong3000

gucong3000 Sep 11, 2017

Member

It was a mistake.

@ntwb

ntwb approved these changes Sep 12, 2017

LGTM 👍

@jeddy3

jeddy3 approved these changes Sep 12, 2017

LGTM

@jeddy3 jeddy3 merged commit 79f3c33 into stylelint:master Sep 12, 2017

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.02%) to 95.639%
Details
@jeddy3

This comment has been minimized.

Member

jeddy3 commented Sep 12, 2017

  • Fixed: *-empty-line-before false positives for CSS in HTML (#2854).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment