From 3b7e45eab42d28c3c14d0127efd7761c33bdd5cd Mon Sep 17 00:00:00 2001 From: LB Johnston Date: Sun, 3 Dec 2023 16:35:11 +1000 Subject: [PATCH] Refine order/order rule to account for @media rule usage - Do not be so strict with rule usage, it may make sense for blocks (e.g. @media) to be after other content - Closes #37 --- README.md | 2 +- index.js | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c95af1a..7d1fa6b 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ Our default export contains all of our Stylelint rules, along with specific plug | [`no-invalid-double-slash-comments`][29] | Enabled | | [`no-invalid-position-at-import-rule`][30] | `{"ignoreAtRules":["use","forward"]}` | | [`no-irregular-whitespace`][31] | Enabled | -| [`order/order`][32] | `[{"name":"include","type":"at-rule"},"declarations"]` | +| [`order/order`][32] | Enabled - [see Config][config] | | [`property-disallowed-list`][33] | `["/forced-color-adjust/","/left/","/right/","text-transform"]` | | [`property-no-unknown`][34] | Enabled | | [`property-no-vendor-prefix`][35] | Enabled | diff --git a/index.js b/index.js index bacde5e..3a50e77 100644 --- a/index.js +++ b/index.js @@ -35,10 +35,9 @@ module.exports = { 'no-empty-source': true, // Mixins should always be first in declarations 'order/order': [ - { - name: 'include', - type: 'at-rule', - }, + 'dollar-variables', + 'custom-properties', + { type: 'at-rule', hasBlock: false }, // @-rules that have no nesting. 'declarations', ], 'property-disallowed-list': [