Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New: Add separate propertyGroups export #323

Merged
merged 2 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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