@mrhenry/stylelint-mrhenry-nesting 2.2.2 → 2.2.3
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/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrhenry/stylelint-mrhenry-nesting",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "Mr. Henry's preferred way of writing nested CSS",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"main": "stylelint-mrhenry-nesting.
|
|
8
|
+
"main": "stylelint-mrhenry-nesting.cjs",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "npm run test:jest",
|
|
11
11
|
"test:jest": "c8 --100 jest"
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"stylelint": "^14.16.1 || ^15.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"stylelint": "^15.
|
|
40
|
+
"stylelint": "^15.10.1"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -64,6 +64,7 @@ const ruleFunction = (primaryOption, secondaryOptionObject, context) => {
|
|
|
64
64
|
while (parent) {
|
|
65
65
|
if (parent.type === 'rule') {
|
|
66
66
|
rulesDepth++;
|
|
67
|
+
break;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
parent = parent.parent;
|
|
@@ -92,6 +93,10 @@ const ruleFunction = (primaryOption, secondaryOptionObject, context) => {
|
|
|
92
93
|
rulesDepth++;
|
|
93
94
|
}
|
|
94
95
|
|
|
96
|
+
if (rulesDepth > 2) {
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
|
|
95
100
|
parent = parent.parent;
|
|
96
101
|
}
|
|
97
102
|
|
|
@@ -297,6 +302,7 @@ function getFirstCompoundOrSelf(x) {
|
|
|
297
302
|
}
|
|
298
303
|
|
|
299
304
|
for (let i = 0; i < x.nodes.length; i++) {
|
|
305
|
+
/* c8 ignore next */
|
|
300
306
|
if (x.nodes[i].type !== 'selector') {
|
|
301
307
|
return x;
|
|
302
308
|
}
|