-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
43 lines (33 loc) · 902 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
const groups = require("@stephanschubert/css-property-groups");
const toRuleObject = names => ({
emptyLineBefore: "always",
properties: names.reduce((acc, name) => [...acc, ...groups[name]], []),
});
const related = [
// Generated content
["content"],
// Position & layout
["position", "flexbox", "float", "grid", "columns"],
// Display & visibility
["display", "clipping"],
// Animations
["animation", "transition"],
// Box model (from outside in)
["margin", "box-shadow", "border", "dimensions", "padding"],
// Background & cursor
["background", "cursor"],
// Typography
["color", "typography"],
// Lists & tables
["list", "table"],
];
module.exports = {
plugins: ["stylelint-order"],
rules: {
"declaration-empty-line-before": null,
"order/properties-order": [
related.map(toRuleObject),
{ unspecified: "bottom" },
],
},
};