Skip to content

Commit

Permalink
New: Add separate propertyGroups export (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
stormwarning committed Dec 21, 2022
1 parent ecc7b61 commit 1f700e0
Show file tree
Hide file tree
Showing 5 changed files with 425 additions and 382 deletions.
7 changes: 7 additions & 0 deletions .changeset/real-melons-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'stylelint-config-recess-order': minor
---

Add separate propertyGroups export

Should help make customising the rule config (like #265) a little easier.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,27 @@ Bootstrap [did][]/[does][].
}
```

## Advanced

The default setup applies only the `'order/properties-order'` rule with the various property groups. If you need to configure other options for this rule,
the groups can be imported separately and the rule configured to your needs.

```js
const propertyGroups = require('stylelint-config-recess-order/groups')

module.exports = {
extends: [], // Do not extend the config here.
rules: {
// Configure the rule manually.
'order/properties-order': propertyGroups.map((group) => ({
...group,
emptyLineBefore: 'always',
noEmptyLineBetween: true,
})),
},
}
```

## References

[@mdo on CSS Property Order][mdo-order]
Expand Down
Loading

0 comments on commit 1f700e0

Please sign in to comment.