@mrhenry/stylelint-mrhenry-prop-order 2.0.14 → 2.0.16

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/order.cjs CHANGED
@@ -299,6 +299,7 @@ module.exports = [
299
299
  "inset-block",
300
300
  "inset-block-start",
301
301
  "inset-block-end",
302
+ "inset-area",
302
303
  "isolation",
303
304
  "justify-content",
304
305
  "justify-items",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrhenry/stylelint-mrhenry-prop-order",
3
- "version": "2.0.14",
3
+ "version": "2.0.16",
4
4
  "description": "Mr. Henry's preferred order for CSS properties",
5
5
  "main": "stylelint-mrhenry-prop-order.cjs",
6
6
  "scripts": {
@@ -30,6 +30,10 @@ const ruleFunction = (primaryOption, secondaryOptionObject, context) => {
30
30
  return;
31
31
  }
32
32
 
33
+ if (!container.nodes?.length) {
34
+ return;
35
+ }
36
+
33
37
  let parent = container;
34
38
  while (parent) {
35
39
  if (parent.type === 'atrule' && ignoredAtRules.includes(parent.name.toLowerCase())) {
@@ -40,10 +44,6 @@ const ruleFunction = (primaryOption, secondaryOptionObject, context) => {
40
44
  }
41
45
 
42
46
  /* c8 ignore next */
43
- if (!container.nodes.length) {
44
- return;
45
- }
46
-
47
47
  // Comments after a node, not one a new line should be kept together with that node.
48
48
  // color: red; /* my color */
49
49
  let matchedComments = new Map();