@mrhenry/stylelint-mrhenry-prop-order 3.0.19 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +22 -19
- package/order.mjs +4 -3
- package/package.json +3 -3
package/index.mjs
CHANGED
|
@@ -126,27 +126,30 @@ const ruleFunction = (primaryOption) => {
|
|
|
126
126
|
endIndex,
|
|
127
127
|
result: postcssResult,
|
|
128
128
|
ruleName,
|
|
129
|
-
fix:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
for (const [comment, prev] of matchedComments) {
|
|
143
|
-
if (!section.includes(prev)) {
|
|
144
|
-
continue;
|
|
129
|
+
fix: {
|
|
130
|
+
apply: () => {
|
|
131
|
+
sortedSection.reverse().forEach((decl) => {
|
|
132
|
+
container.insertBefore(firstNodeIndex, decl);
|
|
133
|
+
return;
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
const finalFirstNode = container.nodes[firstNodeIndex];
|
|
137
|
+
if (originalFirstNode.raws.before && finalFirstNode.raws.before) {
|
|
138
|
+
const originalRawBefore = originalFirstNode.raws.before;
|
|
139
|
+
originalFirstNode.raws.before = finalFirstNode.raws.before;
|
|
140
|
+
finalFirstNode.raws.before = originalRawBefore;
|
|
145
141
|
}
|
|
146
142
|
|
|
147
|
-
comment
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
for (const [comment, prev] of matchedComments) {
|
|
144
|
+
if (!section.includes(prev)) {
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
comment.remove();
|
|
149
|
+
container.insertAfter(prev, comment);
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
node: container
|
|
150
153
|
}
|
|
151
154
|
});
|
|
152
155
|
|
package/order.mjs
CHANGED
|
@@ -96,6 +96,9 @@ export const order = [
|
|
|
96
96
|
"border-left-color",
|
|
97
97
|
"border-left-style",
|
|
98
98
|
"border-left-width",
|
|
99
|
+
|
|
100
|
+
"corners",
|
|
101
|
+
"border-radius",
|
|
99
102
|
// border radius logical shorthands
|
|
100
103
|
"border-inline-start-radius",
|
|
101
104
|
"border-inline-end-radius",
|
|
@@ -116,12 +119,10 @@ export const order = [
|
|
|
116
119
|
"border-top-right-radius",
|
|
117
120
|
"border-bottom-left-radius",
|
|
118
121
|
"border-bottom-right-radius",
|
|
122
|
+
|
|
119
123
|
"border-boundary",
|
|
120
124
|
"border-limit",
|
|
121
125
|
|
|
122
|
-
"corners",
|
|
123
|
-
"border-radius",
|
|
124
|
-
|
|
125
126
|
"border-spacing",
|
|
126
127
|
"border-clip",
|
|
127
128
|
"border-clip-top",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrhenry/stylelint-mrhenry-prop-order",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Mr. Henry's preferred order for CSS properties",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.mjs",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"stylelint-plugin"
|
|
28
28
|
],
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"stylelint": "^16.
|
|
30
|
+
"stylelint": "^16.14.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"css-tree": "^3.1.0",
|
|
34
|
-
"stylelint": "^16.
|
|
34
|
+
"stylelint": "^16.14.1"
|
|
35
35
|
}
|
|
36
36
|
}
|