From 187c465c24681478b2f8730a75114606a6bfbeb3 Mon Sep 17 00:00:00 2001 From: Harley Oliver Date: Thu, 13 Apr 2017 17:47:16 +1000 Subject: [PATCH] Updated and removed deprecated stylelint rules for 8.0 (#116) * Updated and removed deprecated stylelint rules * Removed deprecated unit test --- .../__tests__/media-queries.js | 9 ++++----- packages/stylelint-config-wordpress/index.js | 9 ++------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/packages/stylelint-config-wordpress/__tests__/media-queries.js b/packages/stylelint-config-wordpress/__tests__/media-queries.js index 8e5b6f8b9ee762..bac58a71e44d7c 100644 --- a/packages/stylelint-config-wordpress/__tests__/media-queries.js +++ b/packages/stylelint-config-wordpress/__tests__/media-queries.js @@ -27,15 +27,14 @@ test("There are warnings with invalid media queries CSS", async t => { const { errored, results } = data const { warnings } = results[0] t.truthy(errored, "errored") - t.is(warnings.length, 10, "flags ten warnings") + t.is(warnings.length, 9, "flags ten warnings") t.is(warnings[0].text, "Unexpected unknown at-rule \"@mdia\" (at-rule-no-unknown)", "correct warning text") t.is(warnings[1].text, "Expected single space after \":\" (media-feature-colon-space-after)", "correct warning text") t.is(warnings[2].text, "Expected single space after \":\" (media-feature-colon-space-after)", "correct warning text") t.is(warnings[3].text, "Unexpected whitespace before \":\" (media-feature-colon-space-before)", "correct warning text") - t.is(warnings[4].text, "Unexpected missing punctuation (media-feature-no-missing-punctuation)", "correct warning text") + t.is(warnings[4].text, "Expected single space after range operator (media-feature-range-operator-space-after)", "correct warning text") t.is(warnings[5].text, "Expected single space after range operator (media-feature-range-operator-space-after)", "correct warning text") - t.is(warnings[6].text, "Expected single space after range operator (media-feature-range-operator-space-after)", "correct warning text") + t.is(warnings[6].text, "Expected single space before range operator (media-feature-range-operator-space-before)", "correct warning text") t.is(warnings[7].text, "Expected single space before range operator (media-feature-range-operator-space-before)", "correct warning text") - t.is(warnings[8].text, "Expected single space before range operator (media-feature-range-operator-space-before)", "correct warning text") - t.is(warnings[9].text, "Unexpected whitespace before \",\" (media-query-list-comma-space-before)", "correct warning text") + t.is(warnings[8].text, "Unexpected whitespace before \",\" (media-query-list-comma-space-before)", "correct warning text") }) diff --git a/packages/stylelint-config-wordpress/index.js b/packages/stylelint-config-wordpress/index.js index c5719829852d11..899f69b9545898 100644 --- a/packages/stylelint-config-wordpress/index.js +++ b/packages/stylelint-config-wordpress/index.js @@ -1,7 +1,7 @@ module.exports = { "rules": { "at-rule-empty-line-before": [ "always", { - except: ["blockless-group"], + except: ["blockless-after-blockless"], ignore: ["after-comment"], } ], "at-rule-name-case": "lower", @@ -51,7 +51,6 @@ module.exports = { } ], "media-feature-colon-space-after": "always", "media-feature-colon-space-before": "never", - "media-feature-no-missing-punctuation": true, "media-feature-range-operator-space-after": "always", "media-feature-range-operator-space-before": "always", "media-query-list-comma-newline-after": "always-multi-line", @@ -65,10 +64,7 @@ module.exports = { "number-no-trailing-zeros": true, "property-case": "lower", "property-no-unknown": true, - "rule-nested-empty-line-before": [ "always", { - ignore: ["after-comment"], - } ], - "rule-non-nested-empty-line-before": [ "always", { + "rule-empty-line-before": [ "always", { ignore: ["after-comment"], } ], "selector-attribute-brackets-space-inside": "never", @@ -92,7 +88,6 @@ module.exports = { "selector-list-comma-newline-after": "always", "selector-list-comma-space-before": "never", "selector-max-empty-lines": 0, - "selector-no-empty": true, "selector-pseudo-class-case": "lower", "selector-pseudo-class-no-unknown": true, "selector-pseudo-class-parentheses-space-inside": "never",