Skip to content

Commit

Permalink
Refine order/order rule to account for @media rule usage
Browse files Browse the repository at this point in the history
- Do not be so strict with rule usage, it may make sense for blocks (e.g. @media) to be after other content
- Closes wagtail#37
  • Loading branch information
lb- committed Dec 3, 2023
1 parent 694f2b9 commit 3c69ce2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,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 |
Expand Down
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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': [
Expand Down

0 comments on commit 3c69ce2

Please sign in to comment.