@mrhenry/stylelint-mrhenry-prop-order 3.0.0 → 3.0.2
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 +9 -4
- package/order.mjs +6 -2
- package/package.json +2 -2
package/index.mjs
CHANGED
|
@@ -20,11 +20,16 @@ const ignoredAtRules = [
|
|
|
20
20
|
'property'
|
|
21
21
|
];
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
/** @type {import('stylelint').Rule<true|null>} */
|
|
24
|
+
const ruleFunction = (primaryOption, secondaryOption, context) => {
|
|
24
25
|
return (postcssRoot, postcssResult) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
const validPrimary = stylelint.utils.validateOptions(postcssResult, ruleName, {
|
|
27
|
+
actual: primaryOption,
|
|
28
|
+
possible: [true]
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/* c8 ignore next */
|
|
32
|
+
if (!validPrimary) return;
|
|
28
33
|
|
|
29
34
|
postcssRoot.walk((container) => {
|
|
30
35
|
if (container.type !== 'atrule' && container.type !== 'rule') {
|
package/order.mjs
CHANGED
|
@@ -254,6 +254,7 @@ export const order = [
|
|
|
254
254
|
"font-variant-position",
|
|
255
255
|
"font-variation-settings",
|
|
256
256
|
"font-weight",
|
|
257
|
+
"font-width",
|
|
257
258
|
"footnote-display",
|
|
258
259
|
"footnote-policy",
|
|
259
260
|
"forced-color-adjust",
|
|
@@ -433,8 +434,10 @@ export const order = [
|
|
|
433
434
|
"place-self",
|
|
434
435
|
"pointer-events",
|
|
435
436
|
"position",
|
|
436
|
-
"position-fallback",
|
|
437
437
|
"position-fallback-bounds",
|
|
438
|
+
"position-try-final",
|
|
439
|
+
"position-try-options",
|
|
440
|
+
"position-try-order",
|
|
438
441
|
"print-color-adjust",
|
|
439
442
|
"quotes",
|
|
440
443
|
"r",
|
|
@@ -636,5 +639,6 @@ export const order = [
|
|
|
636
639
|
"writing-mode",
|
|
637
640
|
"x",
|
|
638
641
|
"y",
|
|
639
|
-
"z-index"
|
|
642
|
+
"z-index",
|
|
643
|
+
"zoom"
|
|
640
644
|
]
|
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.0.2",
|
|
4
4
|
"description": "Mr. Henry's preferred order for CSS properties",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.mjs",
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
"stylelint": "^16.0.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"stylelint": "^16.
|
|
33
|
+
"stylelint": "^16.2.1"
|
|
34
34
|
}
|
|
35
35
|
}
|