@plumeria/eslint-plugin 0.20.3 → 0.21.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.
|
@@ -24,10 +24,7 @@ function getPropertyIndex(property, isTopLevel = false) {
|
|
|
24
24
|
if (Array.isArray(name)) {
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
|
-
if (isTopLevel
|
|
28
|
-
(property.key.type !== 'Identifier' ||
|
|
29
|
-
(typeof name === 'string' &&
|
|
30
|
-
(name.startsWith('&') || name.startsWith(':') || name.startsWith('@'))))) {
|
|
27
|
+
if (isTopLevel) {
|
|
31
28
|
return null;
|
|
32
29
|
}
|
|
33
30
|
let lastGroupIndex = 0;
|
|
@@ -42,11 +39,13 @@ function getPropertyIndex(property, isTopLevel = false) {
|
|
|
42
39
|
maxPropIndex = Math.max(maxPropIndex, group.properties.length);
|
|
43
40
|
}
|
|
44
41
|
if (typeof name === 'string') {
|
|
45
|
-
if (name.startsWith('
|
|
42
|
+
if (name.startsWith(':'))
|
|
46
43
|
return (propertyGroups_1.propertyGroups.length + 1) * 1000;
|
|
47
|
-
if (name.
|
|
44
|
+
if (name.startsWith('&'))
|
|
48
45
|
return (propertyGroups_1.propertyGroups.length + 2) * 1000;
|
|
49
|
-
if (name.
|
|
46
|
+
if (name.startsWith('@media'))
|
|
47
|
+
return (propertyGroups_1.propertyGroups.length + 3) * 1000;
|
|
48
|
+
if (name.startsWith('@container'))
|
|
50
49
|
return (propertyGroups_1.propertyGroups.length + 3) * 1000;
|
|
51
50
|
}
|
|
52
51
|
return lastGroupIndex * 1000 + maxPropIndex + 1;
|
|
@@ -883,7 +883,7 @@ exports.validateValues = createRule({
|
|
|
883
883
|
!new RegExp(`^${numberPattern}$`).test(parts[1])) {
|
|
884
884
|
return false;
|
|
885
885
|
}
|
|
886
|
-
return new RegExp(lengthValuePattern).test(parts[2]);
|
|
886
|
+
return new RegExp(`^(${lengthValuePattern}|auto)$`).test(parts[2]);
|
|
887
887
|
}
|
|
888
888
|
return false;
|
|
889
889
|
}
|