diff --git a/CHANGELOG.md b/CHANGELOG.md index 599ffe8..1052d4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Removed - Dropped official support for Node 12 - Removed node 12 from automated test matrix +- Removed stylelint-order plugin. Resolves [#214](https://github.com/bjankord/stylelint-config-sass-guidelines/issues/214) and [#231](https://github.com/bjankord/stylelint-config-sass-guidelines/issues/231) - Removed tests for deprecated stylelint rules - Removed deprecated stylelint rules - "block-opening-brace-space-before": "always" diff --git a/README.md b/README.md index 27e36c4..5b8c310 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ This linter has been designed / tested with SCSS syntax based on the SCSS guidel This config: - bundles the [`stylelint-scss` plugin pack](https://github.com/stylelint-scss/stylelint-scss) and turns on its rules that check for possible errors -- bundles the [`stylelint-order` plugin pack](https://github.com/hudochenkov/stylelint-order) and turns on its rules that check for possible errors - bundles the [`postcss-scss` custom syntax](https://github.com/postcss/postcss-scss) and configures it - has a peer dependency on [`stylelint ^15.2.0`](https://github.com/stylelint/stylelint) You'll need to install this package in your project - has a peer dependency on [`postcss ^8.4.21`](https://github.com/postcss/postcss) You'll need to install this package in your project diff --git a/__tests__/unit/declaration-order.spec.js b/__tests__/unit/declaration-order.spec.js deleted file mode 100644 index ad4b593..0000000 --- a/__tests__/unit/declaration-order.spec.js +++ /dev/null @@ -1,58 +0,0 @@ -const config = require("../../index"); -const stylelint = require("stylelint"); -const postcss = require("postcss"); -const scssSyntax = require("postcss-scss"); -const test = require("tape"); - -const invalidScss = `// scss features not lintable for declaration order in stylelint -.declarationorder { - p { - color: #f00; - background-color: #0f0; - } - - color: #f00; - @include message-box(); - @extend %error; -} - -` - -test('Declaration order scss', t => { - t.plan(5) - - postcss() - .use(stylelint({ code: invalidScss, config: config })) - .process(invalidScss, { syntax: scssSyntax }) - .then(checkResult) - .catch(logError) - - function checkResult(result) { - t.equal(result.warnings().length, 4, 'flags 4 warnings') - var warningsArray = Object.values(result.warnings()).map(x => x.text); - t.is( - warningsArray.includes('Expected background-color to come before color (order/properties-alphabetical-order)'), - true, - 'correct warning text', - ) - t.is( - warningsArray.includes('Expected declaration to come before rule (order/order)'), - true, - 'correct warning text', - ) - t.is( - warningsArray.includes('Expected blockless @include to come before declaration (order/order)'), - true, - 'correct warning text', - ) - t.is( - warningsArray.includes('Expected @extend to come before blockless @include (order/order)'), - true, - 'correct warning text', - ) - } -}) - -function logError(err) { - console.log(err.stack) -} diff --git a/index.js b/index.js index 988167b..3bcb1b6 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ module.exports = { - "plugins": ["stylelint-order", "stylelint-scss"], + "plugins": ["stylelint-scss"], "customSyntax": "postcss-scss", "rules": { "at-rule-disallowed-list": ["debug"], @@ -31,29 +31,6 @@ module.exports = { } ], "media-feature-name-no-vendor-prefix": true, - "order/order": [ - [ - "custom-properties", - "dollar-variables", - { - "type": "at-rule", - "name": "extend" - }, - { - "type": "at-rule", - "name": "include", - "hasBlock": false - }, - "declarations", - { - "type": "at-rule", - "name": "include", - "hasBlock": true - }, - "rules" - ] - ], - "order/properties-alphabetical-order": true, "property-no-unknown": true, "property-no-vendor-prefix": true, "rule-empty-line-before": [ diff --git a/package-lock.json b/package-lock.json index 97f1c02..10fa95f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "license": "MIT", "dependencies": { "postcss-scss": "^4.0.6", - "stylelint-order": "^6.0.3", "stylelint-scss": "^4.4.0" }, "devDependencies": { @@ -1893,14 +1892,6 @@ "node": ">=4" } }, - "node_modules/postcss-sorting": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/postcss-sorting/-/postcss-sorting-8.0.2.tgz", - "integrity": "sha512-M9dkSrmU00t/jK7rF6BZSZauA5MAaBW4i5EnJXspMwt4iqTh/L9j6fgMnbElEOfyRyfLfVbIHj/R52zHzAPe1Q==", - "peerDependencies": { - "postcss": "^8.4.20" - } - }, "node_modules/postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", @@ -2383,19 +2374,6 @@ "url": "https://opencollective.com/stylelint" } }, - "node_modules/stylelint-order": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-6.0.3.tgz", - "integrity": "sha512-1j1lOb4EU/6w49qZeT2SQVJXm0Ht+Qnq9GMfUa3pMwoyojIWfuA+JUDmoR97Bht1RLn4ei0xtLGy87M7d29B1w==", - "license": "MIT", - "dependencies": { - "postcss": "^8.4.21", - "postcss-sorting": "^8.0.2" - }, - "peerDependencies": { - "stylelint": "^14.0.0 || ^15.0.0" - } - }, "node_modules/stylelint-scss": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.4.0.tgz", @@ -4060,12 +4038,6 @@ "util-deprecate": "^1.0.2" } }, - "postcss-sorting": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/postcss-sorting/-/postcss-sorting-8.0.2.tgz", - "integrity": "sha512-M9dkSrmU00t/jK7rF6BZSZauA5MAaBW4i5EnJXspMwt4iqTh/L9j6fgMnbElEOfyRyfLfVbIHj/R52zHzAPe1Q==", - "requires": {} - }, "postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", @@ -4440,15 +4412,6 @@ "write-file-atomic": "^5.0.0" } }, - "stylelint-order": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-6.0.3.tgz", - "integrity": "sha512-1j1lOb4EU/6w49qZeT2SQVJXm0Ht+Qnq9GMfUa3pMwoyojIWfuA+JUDmoR97Bht1RLn4ei0xtLGy87M7d29B1w==", - "requires": { - "postcss": "^8.4.21", - "postcss-sorting": "^8.0.2" - } - }, "stylelint-scss": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.4.0.tgz", diff --git a/package.json b/package.json index 1b57425..7a21e1d 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ ], "dependencies": { "postcss-scss": "^4.0.6", - "stylelint-order": "^6.0.3", "stylelint-scss": "^4.4.0" }, "peerDependencies": { diff --git a/page/de.md b/page/de.md index 66d5aa4..2ed2a4c 100644 --- a/page/de.md +++ b/page/de.md @@ -55,7 +55,6 @@ Zum Beispiel kannst du mit `indentation` Tabs aktivieren und die Regel `number-l ### Erweiterungen -* [`stylelint-order`](https://github.com/hudochenkov/stylelint-order): Eine Erweiterung die Regel CSS-Eigenschaft sortiert. * [`stylelint-scss`](https://github.com/kristerkari/stylelint-scss): Eine Sammlung von SCSS-speziefischen Regeln für stylelint. ### Configured lints