Skip to content

Commit

Permalink
At include rules snould be first by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ronilaukkarinen committed Jun 22, 2021
1 parent 5f0e83b commit f0e20d8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v6.2.1

* Fix: Media queries should be last by default
* Fix: @include should be first by default

## v6.2.0

* Force alphabetical sorting by default
Expand Down
9 changes: 8 additions & 1 deletion lib/formatOrder.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,18 @@ function getSordOrder (params) {
function getDeclarationBlocksOrder (params) {
// stylelint-order rule or default
var declarationBlockOrder = params.stylelint['order/order'] || [
{
"type": "at-rule",
"name": "include"
},
'custom-properties',
'dollar-variables',
'declarations',
'rules',
'at-rules',
{
"type": "at-rule",
"name": "media"
}
]
return flattenRule(declarationBlockOrder)
}
Expand Down

0 comments on commit f0e20d8

Please sign in to comment.