Skip to content

Commit

Permalink
Updated and removed deprecated stylelint rules for 8.0 (#116)
Browse files Browse the repository at this point in the history
* Updated and removed deprecated stylelint rules

* Removed deprecated unit test
  • Loading branch information
harleyoliver authored and ntwb committed May 31, 2020
1 parent 37730f4 commit 187c465
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
})
9 changes: 2 additions & 7 deletions packages/stylelint-config-wordpress/index.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 187c465

Please sign in to comment.